/* Questo menu (modificato) e' (C)2001 ri.riccardi@agora.stm.it - Lo script e' reperibile al sito http://www.jsdir.com - JavaScript Directory */
var ron="#99cccc"; 
var roff="#ffcccc";
var leftmargin=-7; 
var topmargin=15; 
var largo=212;
var voci=new Array();
	voci[0]=new Array("ORGANIZZAZIONE","Scuola e territorio","Offerta formativa (POF)","Modelli organizzativi","Organigramma sicurezza","Indirizzo musicale","Conto annuale","Rendicontazione fondi","Integrazione stranieri");
	voci[1]=new Array("REGOLAMENTI","Regolamento d'Istituto","Patto corresponsabilita'","Lab. informatica","Lab. scienze","Biblioteca","Viaggi istruzione","Indirizzo musicale","Formazione classi prime","Norme disciplinari personale");
	voci[2]=new Array("INFO UTENZA","Calendario scolastico","Orari ricevimento","Orario definitivo","Orario insegnanti","Calendario riunioni","Iscrizioni","Rilascio documenti","Testi adottati","Graduatorie","Curriculum dirigente");
	voci[3]=new Array("AREA INFORMATICA","Il software libero","Esami patente europea","Corsi per enti esterni");
	voci[4]=new Array("VARIE","Opinioni","Mappa del sito","Home page","Istituto Tecnico");

var links=new Array();
	links[0]=new Array("","scuola_territorio.htm","pof.pdf","modelli_organizzativi.htm","organigramma_sicurezza.pdf","http://www.mediamagione.it/musica/pagina_iniziale_musica.htm","programma_annuale.pdf","modello_rendicontazione.pdf","miao.pdf")
	links[1]=new Array("","regolamento.pdf","patto_corresponsabilita.pdf","regolamento_lab_informatica.pdf","regolamento_lab_scienze.pdf","regolamento_biblioteca.pdf","regolamento_viaggi_istruzione.pdf","indirizzo_musicale.pdf","criteri_formazione_classi_prime.pdf","norme_disciplinari_personale.html")
	links[2]=new Array("","calendario_scolastico.pdf","orari_ricevimento.htm","orario_classi.pdf","orario_insegnanti.pdf","calendario_impegni.pdf","iscrizioni.htm","rilascio_documenti.htm","libri_testo.htm","graduatorie.html","curriculum.pdf")
	links[3]=new Array("","linux.html","esami_ecdl.htm","corsi_esterni.htm")
	links[4]=new Array("","mailto:pgmm111007@istruzione.it","mappa.htm","index.html","http://www.itcmagione.it/index.html")
var wst=new Array();
	wst[0]=new Array(" "," "," "," "," "," "," "," "," ");
	wst[1]=new Array(" "," "," "," "," "," "," "," "," "," ");
	wst[2]=new Array(" "," "," "," "," "," "," "," "," "," "," ");
	wst[3]=new Array(" "," "," "," ");
	wst[4]=new Array(" "," "," "," "," ");
var nn=document.layers?true:false,conta=0,last=0;

if (nn)
	{
	//document.write("<LAYER NAME=mtop. position=absolute left="+leftmargin+" top="+topmargin+" width=50 height=15 clip=0,0,50,15 bgColor="+roff+" visibility=visible onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')>&nbsp;<A HREF='index.html' CLASS=menuNNb>&nbsp;</A></LAYER>");
	for (i=0;i<voci.length;i++)
		{
		var n=i;
		document.writeln("<LAYER NAME=mtop"+n+". position=absolute left="+eval(leftmargin+15+largo*i)+" top="+topmargin+" width="+largo+" height=25 clip=0,0,"+largo+",20 bgColor="+roff+" visibility=visible onMouseOver=MostraMenu("+i+");mroll('mtop"+i+".');conta++ onMouseOut=last="+i+";unmroll('mtop"+i+".');conta--><DIV ALIGN=center VALIGN=top >&nbsp;<A HREF=javascript:mroll('mtop"+i+".') CLASS=menuNNb>"+voci[i][0]+"</A></DIV></LAYER>");
		for (l=1;l<voci[i].length;l++)
			document.writeln("<LAYER NAME=mdep"+i+"."+l+" position=absolute left="+eval(leftmargin+15+largo*i)+" top="+eval(topmargin+25*l)+" width="+largo+" height=25 clip=0,0,"+largo+",20 bgColor="+roff+" visibility=hidden onMouseOver=mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta-->&nbsp;<A HREF=javascript:mroll('mdep"+n+"."+l+"') onClick=vai('"+links[i][l]+"',"+i+","+l+") CLASS=menuNN>"+voci[i][l]+"</A></LAYER>");
		}
	}
	else
	{
	
	for (i=0;i<voci.length;i++)
		{
		var n=i;
		document.writeln("<DIV ID=mtop"+n+". STYLE=\"position:absolute;left:"+eval(leftmargin+15+largo*i)+";top:"+topmargin+";width:"+largo+";height:25;background:"+roff+";visibility:visible;cursor:hand\" onMouseOver=MostraMenu("+n+");mroll('mtop"+n+".');conta++ onMouseOut=last="+n+";unmroll('mtop"+n+".');conta--><DIV ALIGN=center CLASS=menuIEb>&nbsp;"+voci[i][0]+"</DIV></DIV>");
		for (l=1;l<voci[i].length;l++)
			document.writeln("<DIV ID=mdep"+i+"."+l+" STYLE=\"position:absolute;left:"+eval(leftmargin+15+largo*i)+";top:"+eval(topmargin+25*l)+";width:"+largo+";height:25;background:"+roff+";visibility:hidden;cursor:hand\" onMouseOver=;mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta-- CLASS=menuIE onClick=vai('"+links[i][l]+"',"+i+","+l+")>&nbsp;"+voci[i][l]+"</DIV>");
		}
	}

timer=setInterval("NascondiMenu()",1000)

function NascondiMenu()
	{
	if (conta==0)
		{
		coloratutti(true)
		timer=setTimeout("coloratutti(false)",200);
		timer=setTimeout("showdeps(last,false)",250);
		}
	}

function coloratutti(col)
	{
	colore=col?ron:roff;
	for (i=0;i<voci.length;i++)
		for (j=1;j<voci[i].length;j++)
			{
		if (nn)
			document.layers["mdep"+i+"."+j].bgColor=colore;
		else
			if(document.all)
				document.all["mdep"+i+"."+j].style.background=colore;
				else
				document.getElementById('mdep'+i+"."+j).style.background=colore;
			}
	}

function MostraMenu(n)
	{
	showdeps(last,false);
	showdeps(n,true);
	last=n;
	}

function showdeps(n,act)
	{
	if (conta==0)
		{
		act?stat="visible":stat="hidden";
	if (nn)
		for (i=1;i<voci[n].length;i++)
			document.layers["mdep"+n+"."+i].visibility=stat;
	else
		for (i=1;i<voci[n].length;i++)
			if(document.all)
				document.all["mdep"+n+"."+i].style.visibility=stat;
				else
				document.getElementById('mdep'+n+"."+i).style.visibility=stat;
		}
	}


function vai(dove,r,c)
	{
	lev=nn?document.layers["mdep"+r+"."+c]:(document.all)?document.all["mdep"+r+"."+c].style:document.getElementById("mdep"+r+"."+c).style;
	if (nn)
		{
		lev.bgColor=roff;
		timer=setTimeout("lev.bgColor=ron",50)
		timer=setTimeout("lev.bgColor=roff",100)
		timer=setTimeout("lev.bgColor=ron",150)
		timer=setTimeout("lev.bgColor=roff",200)
		timer=setTimeout("lev.bgColor=ron",250)
		}
		else
		{
		lev.background=roff;
		timer=setTimeout("lev.background=ron",50)
		timer=setTimeout("lev.background=roff",100)
		timer=setTimeout("lev.background=ron",150)
		timer=setTimeout("lev.background=roff",200)
		timer=setTimeout("lev.background=ron",250)
		}
	timer=setTimeout("self.location.href='"+dove+"'",350)
	}

function mroll(l)
	{
	nn?document.layers[l].bgColor=ron:(document.all)?document.all[l].style.background=ron:document.getElementById(l).style.background=ron;
	document.getElementById?document.getElementById(l).style.cursor=document.all?'hand':'pointer':'void(0)';
	if (l.substr(0,4)=="mdep")
		stringa=wst[l.substr(4,l.indexOf(".")-4)][l.substring(l.indexOf(".")+1,l.length)];
			else if (l.length>5)
			stringa=wst[l.substr(4,l.indexOf(".")-4)][0];
				else stringa="Home Page";		
	window.status=stringa;
	timer=setTimeout("window.status=stringa",20);
	}

function unmroll(l)
	{
	nn?document.layers[l].bgColor=roff:(document.all)?document.all[l].style.background=roff:document.getElementById(l).style.background=roff;
	window.status="";
	}


