/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * Sezione personalizzabile..
 * Modificare le variabili e gli array seguenti per adattare il menu al propri sito.
 * L'ultima voce di questo menu e' un link a JsDir, se credete potete toglierlo, ma in tal caso vi preghiamo
 * di lasciare il riferimento della riga seguente... dopotutto non l'avete pagato nulla, quindi... che vi costa? :-)
 *
 * Ultimo aggiornamento: 09 - Dicembre - 2002
 *
 * Questo menu e' (C)2001 ri.riccardi@agora.stm.it - Lo script e' reperibile al sito http://www.jsdir.com - JavaScript Directory
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var ron="#666666"; // Colore al MouseOver
var roff="#242424"; // Colore di default
var leftmargin=143; // Distanza dal margine sinistro della pagina ( ---> v. commento alla riga 57)
var topmargin=86; // Distanza dal margine superiore della pagina
var largo=116; // Larghezza dei layers, quindi distanza (orizzontale) fra i sottomenu

var Home = true; // Settare a "false" se non si desidera il link all'homepage
var HomeLink = "indexnuova.html"; // URL della homepage
var HomeText = "MENU':"; // Testo del link alla homepage
var HomeWidth = 0; // Larghezza del livello che contiene il tasto alla homepage. (se "Home" viene impostato a "false" viene azzerato.

/* L'array seguente contiene i testi che verranno visualizzati dal menu.
 * Nell'esempio (il menu di JsDir) trovate quattro elementi dell'array "voci" corrispondenti alle quattro voci del menu principale
 * Il primo elemento degli array e' il nome del menu, gli elementi successivi sono i links contenuti nel singolo menu.
 * Il tasto "Home" non compare in questo array perche' viene inserito di default come primo elemento */


/* X LUCA LEATHERMAN: LE ETICHETTE DEL MENU A TENDINA SI MODIFICANO QUI SOTTO SULL'ARRAY VOCI */


var voci=new Array();


/* SOSTITUISCILI A PIACERE, SE TI SERVONO + COLONNE AL MENU, BASTA AGGIUNGERE UNA RIGA UGUALE A QUELLE QUI SOTTO MODIFICANDO
   IL NUMERO CHE STA TRA PARENTESI QUADRE, INCREMENTANDOLO DI UNO OGNI MENù CHE VUOI AGGIUNGERE

*/
	voci[0]=new Array("NEWS","news","new album","on the road","agenda","site's map")
	voci[1]=new Array("MULTIMEDIA","mp3","j.f.mp3","video","tabs","pj on network");
	voci[2]=new Array("COMMUNITY","contacts","newsletter","activism","forum","links","members links","other bands","lp of the month","playlist","cover bands","you rock");
	voci[3]=new Array("INFO","members","biography","discography","singles","x-mas singles","side projects","collaborations","out takes","recording sessions","dvd e vhs","books guide","ten club","lyrics","interpretations","gear");
    voci[4]=new Array("SPECIALS","specials","interviews","pj in italy","photos","quotes","f.a.q.")


/* 	PER ESEMPIO: voci[4]=new Array("luca","FORUM","CHAT")

	ATTENTO PERò, L'AGGIUNTA VA FATTA ANCHE NEGLI ARRAY CHE SEGUONO, CIOè "links" , "targets" E "wst"

 	PER ESEMPIO: 
			links[4]=new Array("/","METTI IL LINK AL FORUM","METTI IL LINK ALLA CHAT")   
		     	targets[4]=new Array("self","new","new")

			"self" INDICA CHE IL LINK LO VISUALIZZA SULLA STESSA FINESTRA "new" FA APRIRE UN ALTRA FINESTRA AL BROWSER

			wst[4]=new Array("per discutere on line","il forum più fico del mondo","la chat per intenditori")

			QUESTE INVECE SONO LE SCRITTE CHE APPAIONO IN FONDO AL BROWSER

	ORA FORSE TI STARAI CHIEDENDO: PERCHè TUTTA STA MONNEZZA CHE HO SCRITTO NON APPARE NELLA TUA HOME PAGE DI PROVA??

	RISPOSTA: SONO SOLO COMMENTI

	IL CODICE SI COMMENTA FACENDOLO PRECEDERE DAL TAG /* E FACENDOLO SEGUIRE DAL TAG 

	BUON LAVORO

*/


/* Questo array contiene invece i links che saranno aperti dalle singole voci dei sottomenu.
 * In questa nuova versione del menu ( 09 Dic 2002 ) e' possibile specificare un link anche per la voce principale del menu */
var links=new Array();

	links[0]=new Array("#","http://www.pearljamonline.it/news.htm","http://www.pearljamonline.it/curiosit%E0/newalbum.htm","http://www.pearljamonline.it/OnTheRoad/concerti.htm","http://www.pearljamonline.it/curiosit%E0/AGENDA.htm","http://www.pearljamonline.it/curiosit%E0/MAP.htm")
	links[1]=new Array("#","http://www.pearljamonline.it/mp3.htm","http://www.pearljamonline.it/SongOfTheMonth/mp3ofthemonth.htm","http://www.pearljamonline.it/video.htm","http://www.pearljamonline.it/curiosit%E0/tabs/PjOnLineTabs.htm","http://www.pearljamonline.it/curiosit%E0/media.htm")
	links[2]=new Array("#","http://www.pearljamonline.it/curiosità/contatti.htm","http://www.pearljamonline.it/newsletter.htm","http://www.pearljamonline.it/activism.htm","http://pearljam.forumcommunity.net/","http://www.pearljamonline.it/links.htm","http://www.pearljamonline.it/bandmemberslinks.htm","http://www.pearljamonline.it/bands.htm","http://www.pearljamonline.it/curiosità/a.htm","http://www.pearljamonline.it/playlist/playlist.htm","http://www.pearljamonline.it/coverband.htm","http://www.pearljamonline.it/curiosità/urock.htm")
	links[3]=new Array("#","http://www.pearljamonline.it/componenti.htm","http://www.pearljamonline.it/biografia.htm","http://www.pearljamonline.it/discografia.htm","http://www.pearljamonline.it/singles.htm","http://www.pearljamonline.it/xmas%20singles.htm","http://www.pearljamonline.it/discografiasoloesides.htm","http://www.pearljamonline.it/collaborazioni.htm","http://www.pearljamonline.it/outtakes.htm","http://www.pearljamonline.it/rs.htm","http://www.pearljamonline.it/dvdevhs.htm","http://www.pearljamonline.it/curiosit%E0/books.htm","http://pearljam.forumcommunity.net/?t=1380328","http://www.pearljamonline.it/testi&traduzioni.htm","http://pearljam.forumcommunity.net/?f=730864","http://www.pearljamonline.it/strumentazione.htm")
    links[4]=new Array("#","http://www.pearljamonline.it/specials.htm","http://www.pearljamonline.it/curiosit%E0/Intervisteandmore/Pearl%20Jam%20Interviste.htm","http://www.pearljamonline.it/italy.htm","http://www.pearljamonline.it/FOTO/INDEX.HTM","http://www.pearljamonline.it/curiosit%E0/QUOTES.htm","http://www.pearljamonline.it/curiosit%E0/FAQ.htm")
/* Questo array contiene i target dei links
 * E' possibile scegliere fra "self" e "new" (o qualsiasi altro valore)
 * "self" aprira' il link nella stessa finestra d'origine, "new" o qualsiasi altro valore aprira' una nuova finestra del browser
 * come un TARGET="_new" messo in un normale link A 
 * - - - - - - - - - - - - - - - - -
 * In una prossima revisione del menu sara' possibile aprire anche delle pop-up */
var targets=new Array();
	targets[0]=new Array("self","self","self","self","self","self","self","self","self","self","self","self","self")
	targets[1]=new Array("self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self")
	targets[2]=new Array("self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self")
	targets[3]=new Array("self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self")
    targets[4]=new Array("self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self","self")
/* Ultimo array.
 * Contiene i testi che saranno visualizzati nella barra di stato del browser quando il mouse e' sopra una voce del menu  */
var wst=new Array();
	wst[0]=new Array("Le ultime news sulla band e gli aggiornamenti del sito","Tutte le news del mondo Pearl Jam e molto altro","Tutto sul nuovo album dei Pearl Jam","Set lists, foto dei concerti della band","Agenda","Una guida sul 'come orientarsi' su Pearl Jam OnLine");
	wst[1]=new Array("La parte multimediale del sito: video, canzoni...","Gli MP3s presenti su Pearl Jam OnLine","J.F.Mp3...in altre parole Just Fuckin Music: MP3 Of The Month","I videoclip della band di Seattle: guardali in streaming e leggi le note di produzione","Tutte le tabulature con accordi delle songs dei Pearl Jam","I riferimenti a film, telefilm e canzoni nelle quali compaiono i nostri","Love Boat Radio: la radio di Pearl Jam Online");
	wst[2]=new Array("La comunità di PJ OnLine e i links consigliati","Come contattare il webmaster del sito","Ricevi le news del sito via email","You can't be neutral on a moving train...","Follow The STRANGEST TRIBE...","I links ai migliori siti sul web dedicati alla band di Seattle","I links monografici dei componenti dei Pearl Jam","Non solo Pearl Jam...","Il disco del mese consigliato da PJ OnLine","Gli ascolti della redazione di PJ OnLine","Le cover bands italiane dei Pearl Jam e le loro prossime date","Thanks again PT");
	wst[3]=new Array("Tutte le informazioni sui Pearl Jam","Chi sono i Pearl Jam? Scoprilo qui!","La storia della band","Tutti i dischi dei Pearl Jam con tracklists, note e commenti","I singoli della band","I singoli natalizi regalati come ogni anno dal Ten Club","Gli album solisti e i side projects dei membri della band","Le collaborazioni che hanno interessato la band in tutti questi anni","Le out takes dei Pearl Jam","Le sessions di registrazione in studio dei Pearl Jam","Le VHS e i DVD prodotti dalla band","I libri scritti sulla band","Informazioni & domande sul TEN CLUB","Testi e traduzioni","I've understood feelings and I've understood words","La strumentazione dei Pearl Jam");
    wst[4]=new Array("Gli specials, le foto e tanto altro","Gli specials di Pearl JamOnLine","Le interviste ai Pearl Jam","Informazioni sulle date in Italia dei Pearl Jam","Foto e curiosità del mondo Pearl Jam","Le frasi storiche pronunciate dai Pearl Jam","Domande e Risposte sulla band");






			/*	QUELLO CHE SEGUE NON TI INTERESSA CARO LUCA, CONCENTRATI SUL SOPRA :)      */









/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * Fine sezione personalizzabile.
 * Le righe che seguono costituiscono il menu vero e proprio.
 * La personalizzazione e' consigliata solo a webmaster un po' esperti di JavaScript, ad eccezione della riga evidenziata
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var nn=document.layers?true:false,N6=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1?true:false,conta=0,last=0;
var op=navigator.userAgent.toLowerCase().indexOf("firefox")!=-1?true:false
HomeWidth=Home?HomeWidth:0;
var MenuLength=HomeWidth+largo*voci.length;
var BrowserWidth=nn||op?window.innerWidth:N6?document.width:document.body.clientWidth;
leftmargin=parseInt((BrowserWidth-MenuLength)/2); // Commentare questa riga con // all'inizio se non si desidera i menu al centro della pagina, bensi' nella posizione definita in "leftmargin"

if (nn)
	{
	if (Home)
		document.write("<LAYER NAME=mtop. position=absolute left="+leftmargin+" top="+topmargin+" width="+HomeWidth+" height=15 clip=0,0,"+HomeWidth+",15 bgColor="+roff+" visibility=visible onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.') CLASS=menuNNb>&nbsp;<A HREF='"+HomeLink+"' CLASS=menuNNb>"+HomeText+"</A></LAYER>");
	for (i=0;i<voci.length;i++)
		{
		var n=i;
		document.writeln("<LAYER NAME=mtop"+n+". position=absolute left="+eval(leftmargin+HomeWidth+largo*i)+" top="+topmargin+" width="+largo+" height=15 clip=0,0,"+largo+",15 bgColor="+roff+" visibility=visible onMouseOver=MostraMenu("+i+");mroll('mtop"+i+".');conta++ onMouseOut=last="+i+";unmroll('mtop"+i+".');conta--><DIV ALIGN=center CLASS=menuNNb>&nbsp;<A HREF=javascript:mroll('mtop"+i+".') onClick=vai('"+links[i][0]+"',"+i+",0) 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+HomeWidth+largo*i)+" top="+eval(topmargin+15*l)+" width="+largo+" height=15 clip=0,0,"+largo+",15 bgColor="+roff+" visibility=hidden onMouseOver=mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta--  CLASS=menuNNb>&nbsp;<A HREF=javascript:mroll('mdep"+n+"."+l+"') onClick=vai('"+links[i][l]+"',"+i+","+l+") CLASS=menuNN>"+voci[i][l]+"</A></LAYER>");
		}
	}
	else
	{
	if (Home)
		document.write("<DIV ID=mtop. STYLE=\"position:absolute;left:"+leftmargin+";top:"+topmargin+";width:"+HomeWidth+";height:15;background:"+roff+";visibility:visible;cursor:hand\" onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')><A HREF='"+HomeLink+"' CLASS=menuIEb onFocus=this.blur()>&nbsp;"+HomeText+"</A></DIV>");
	for (i=0;i<voci.length;i++)
		{
		var n=i;
		document.writeln("<DIV ID=mtop"+n+". STYLE=\"position:absolute;left:"+eval(leftmargin+HomeWidth+largo*i)+";top:"+topmargin+";width:"+largo+";height:15;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 onClick=vai('"+links[i][0]+"',"+i+",0)>&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+HomeWidth+largo*i)+";top:"+eval(topmargin+15*l)+";width:"+largo+";height:15;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)
	{
	if (c>0)
		lev=nn?document.layers["mdep"+r+"."+c]:(document.all)?document.all["mdep"+r+"."+c].style:document.getElementById("mdep"+r+"."+c).style;
	else
		lev=nn?document.layers["mtop"+r+"."]:(document.all)?document.all["mtop"+r+"."].style:document.getElementById("mtop"+r+".").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)
		}
   	if (navigator.userAgent.toLowerCase().indexOf("msie")!=-1 && navigator.platform.toLowerCase().indexOf("mac")=="mac")
	   document.write("")  
	timer=targets[r][c]=="self"?setTimeout("self.location.href='"+dove+"'",350):setTimeout("window.open('"+dove+"')",350);
	}

function mroll(l)
	{
	LTop="mtop"+l.substr(4,l.indexOf(".")-4)+".";
	nn?document.layers[LTop].bgColor=ron:(document.all)?document.all[LTop].style.background=ron:document.getElementById(LTop).style.background=ron;
	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)
	{
	LTop="mtop"+l.substr(4,l.indexOf(".")-4)+".";
	nn?document.layers[LTop].bgColor=roff:(document.all)?document.all[LTop].style.background=roff:document.getElementById(LTop).style.background=roff;
	nn?document.layers[l].bgColor=roff:(document.all)?document.all[l].style.background=roff:document.getElementById(l).style.background=roff;
	window.status="";
	}

