function ApriImg(img,dida) {
	msgWindow=window.open("","displayWindow","status=yes,resizable=yes,menubar=no,width=700,height=560")
	msgWindow.document.open()
	msgWindow.document.write('<HTML><HEAD><TITLE>Dettagli immagine</TITLE></HEAD>')
	msgWindow.document.write('<BODY background="../common/img/sfondo.gif"><TABLE height=100% width=100%><tr><td align=center valign=middle>')
	msgWindow.document.write(dida+'<BR><BR>')
	msgWindow.document.write('<IMG SRC='+img+'><BR><A HREF=javascript:window.close()><img src="../common/img/fr_back.gif"  VSPACE="5" BORDER="0" ALT="Chiudi"></A></td><tr></table></BODY></HTML>')
	msgWindow.document.close()
	msgWindow.focus()
	if ((document.windows != null) && (!msgWindow.opener)) {
		msgWindow.opener = document.window
	}
}

function Active(obj,ID) {
	document.images[ID].src = obj
}

function PaginaTop(imgTitolo) {
	Menu(imgTitolo)
}

function PaginaBottom(xTop) {
	doc = this.document
	if (xTop!=null) {
		doc.write('<div align=right>'+inizio.GeneraLink()+'<div>')
	}
	Stat("Avvolte")
	doc.write('</TD></TR></TABLE>')
	doc.write('</TD></TR></TABLE>')
}


Carica()

function Carica() {

	menu = new Array()

	menu[1] = new VoceMenu("Chi",	"Chi &egrave;",		"../chi/index.htm", "b_chi",60,68,2,0,"yes")
	menu[2] = new VoceMenu("Labor",	"Laboratori",		"../labor/index.htm", "b_labor",60,68,2,0,"yes")
	menu[3] = new VoceMenu("Spett",	"Spettacoli",		"../spett/index.htm", "b_spett",60,68,2,0,"yes")
	menu[4] = new VoceMenu("Gall",	"Galleria",			"../gall/index.htm", "b_gall",60,68,2,0,"yes")
	menu[5] = new VoceMenu("Archiv","Archivio",			"../archiv/index.htm", "b_archiv",60,68,2,0,"yes")
	menu[6] = new VoceMenu("Link",	"Link",				"../link/index.htm", "b_link",60,68,2,0,"yes")
	menu[7] = new VoceMenu("Mail",	"Scriveteci",		"mailto:raf@lillinet.org?subject=www.avvolte.org richiesta informazioni", "b_mail",60,68,2,0,"yes")

	titolo =  new VoceMenu("Home",	"Home page",		"../home/index.htm", "b_home",654,26,0,0,"no")
	inizio =  new VoceMenu("Inizio","Inizio pagina",	"#", "fr_top",48,80,0,0,"no")
	}

function Menu(imgTitolo) {
	if (menu.length==0) {
		Carica()
	}
	doc = this.document
	//menu di destra
	doc.write('<TABLE WIDTH="100%" HEIGHT="100%" cellpadding=0 cellspacing=0 border=0>')
	doc.write('<TR>')
	doc.write('  <TD ALIGN="CENTER" VALIGN="top" bgcolor="#BDBDBD">')
	doc.write('    <img src="../common/img/vuoto.gif" width=132 height=26><BR>')

	for (i=1; i<menu.length; i++) {
		doc.write(menu[i].GeneraLink()+'<BR>')
	}
	doc.write('    <TABLE width="100%" HEIGHT="100%" background="../common/img/goccia.gif" cellpadding=0 cellspacing=0 border=0><tr><td>&nbsp;</td></tr></table>')
	doc.write('  </TD>')
	doc.write('  <TD WIDTH=100% VALIGN=top background="../common/img/sfondo.gif">')
	doc.write('    <TABLE WIDTH="100%" cellpadding=0 cellspacing=0 border=0>')
	doc.write('    <TR>')
	if (imgTitolo!="") {
		doc.write('      <TD>'+titolo.GeneraLink()+'<BR><img src="'+imgTitolo+'"></TD>')
	}
	doc.write('    </TR>')
	doc.write('    </TABLE>')
	doc.write('    <TABLE WIDTH="100%" cellpadding=30 cellspacing=0 border=0><TR><TD>')

}


// Classe VoceMenu
function VoceMenu(Name,Titolo,Link,Img,x,y,vspace,hspace,act) {
	this.Name = Name
	this.Titolo = Titolo
	this.Link   = Link
	this.Img   = Img
	this.y   = y
	this.x   = x
	this.hspace   = hspace
	this.vspace   = vspace
	this.act   = (act=="yes")
	this.Sottomenu = new Array()
	this.imgoff = new Image
	this.imgoff.src = "../common/img/"+Img+"_off.gif"
	this.imgon = new Image
	this.imgon.src = "../common/img/"+Img+"_on.gif"
	if (act) {
		this.imgact = new Image
		this.imgact.src = "../common/img/"+Img+"_act.gif"
	}
	this.GeneraLink    = xGeneraLink
}

function xGeneraLink() {
	return GeneraLink (this)
}

// Bottoni
function GeneraLink(Obj) {
	return '<A HREF="'+Obj.Link+'" onMouseOver=\'Active("'+Obj.imgon.src+'","'+Obj.Name+'")\' onMouseOut=\'Active("'+Obj.imgoff.src+'","'+Obj.Name+'")\''+(Obj.act?' onClick=\'Active("'+Obj.imgact.src+'","'+Obj.Name+'")\'':'')+'><img src="'+Obj.imgoff.src+'" width='+Obj.x+' height='+Obj.y+' NAME="'+Obj.Name+'" ALT="'+Obj.Titolo+'" BORDER=0 vspace='+Obj.vspace+' hspace='+Obj.hspace+'></A>'
}


function Stat(Sito) {
	d=document;
	d.write("<div align=right>");
	d.write("<a href=\"http://usa.nedstatbasic.net/cgi-bin/viewstat?name="+Sito+"\"><img src=\"http://usa.nedstatbasic.net/cgi-bin/nedstat.gif?name="+Sito+"\" border=0 alt=\"\" nosave width=1 height=1></a>");
	d.write("<img src=\"http://usa.nedstatbasic.net");
	d.write("/cgi-bin/referstat.gif?");
	d.write("name="+Sito+"&refer=");
	d.write(escape(top.document.referrer));
	d.write("\" width=1 height=1 align=\"right\">");
	d.write("</div>");
}

