// JavaScript Document
//Contents for menu 1
var voci= new Array();
voci[0]="classe";
voci[1]="fireball";
voci[2]="iscrizione";
voci[3]="regate";
voci[4]="delegazioni";
voci[5]="mondo";
voci[6]="galleria";
voci[7]="interattiva";
voci[8]="abbigliamento";

var menu1=new Array();
menu1[0]='<a href="../LACLASSE/organigramma.htm">Organigramma</a>';
menu1[1]='<a href="../LACLASSE/statuto.htm">Statuto</a>';
//menu1[2]='<a href="../LACLASSE/regolamentodiclasse.htm">Regolamento</a>';
menu1[2]='<a href="../LACLASSE/normeperlapubblicita.htm">Norme Pubblicità</a>';
menu1[3]='<a href="../LACLASSE/bilanci.htm">Bilanci</a>';
menu1[4]='<a href="../LACLASSE/informazioniutili.htm">Informazioni Utili</a>';
menu1[5]='<a href="../LACLASSE/contatti.htm">Contatti</a>';
menu1[6]='<a href="../LACLASSE/biblioteca.htm">Biblioteca Documenti</a>';
//Contents for menu 2, and so on
var menu2=new Array();
menu2[0]='<a href="../ILFIREBALL/presentazione.htm">Presentazione</a>';
menu2[1]='<a href="../ILFIREBALL/storia.htm">Un po di Storia...</a>';
menu2[2]='<a href="../ILFIREBALL/helpdesk.php">Technical Help Desk</a>';
menu2[3]='<a href="../ILFIREBALL/fireballdavicino.htm">Il Fireball da Vicino</a>';
menu2[4]='<a href="../ILFIREBALL/numerivelici.htm">Lista Numeri Velici</a>';
menu2[5]='<a href="../ILFIREBALL/caf.htm">AVVIAMENTO FIREBALL</a>';
menu2[6]='<a href="../ILFIREBALL/quaranta.htm">Quarantennale 1967-2007</a>';
menu2[7]='<a href="../BARCHESOCIALI/barche.htm">Le Barche di Classe</a>';
//terzo menu
var menu3=new Array();
menu3[0]='<a href="../COMEISCRIVERSI/modalita.htm">Modalità di Iscrizione</a>';
menu3[1]='<a href="../COMEISCRIVERSI/moduloelettronico.htm">Modulo Elettronico</a>';
menu3[2]='<a href="../COMEISCRIVERSI/modulistica.htm">Modulistica per la Stampa</a>';
//quarto menu le regate
var menu4=new Array();
//menu4[0]='<a href="../LEREGATE/calnaz.php">Calendario Nazionale</a>';
menu4[0]='<a href="../LEREGATE/calinter.htm">Calendario Internazionale</a>';
menu4[1]='<a href="../LEREGATE/campit.htm">Campionati Italiani</a>';
menu4[2]='<a href="../LEREGATE/archivioregate09.htm">Archivio Regate 2009</a>';
menu4[3]='<a href="../LEREGATE/archivioregate.htm">Archivio Regate 2008</a>';
menu4[4]='<a href="../LEREGATE/rankinglist.htm">Ranking List</a>';
menu4[5]='<a href="../LEREGATE/albodoro.htm">Albo d Oro</a>';
menu4[6]='<a href="../GALLERIA/reportage_it07.php">Santa Marinella 2007</a>';
menu4[7]='<a href="../GALLERIA/reportage_an07.php">Andora 2007</a>';
//menu 5 delegazioni
var menu5=new Array();
menu5[0]='<a href="../DELEGAZIONI/primazona.htm">I Zona</a>';
menu5[1]='<a href="../DELEGAZIONI/secondazona.htm">II Zona</a>';
menu5[2]='<a href="../DELEGAZIONI/quartazona.htm">IV Zona</a>';
menu5[3]='<a href="../DELEGAZIONI/quindicesimazona.htm">XV Zona</a>';
//menu 6  mondofireball
var menu6=new Array();
menu6[0]='<a href="../MONDOFIREBALL/associazioni.htm">Associazioni di Classe</a>';
menu6[1]='<a href="../MONDOFIREBALL/costruttori.htm">Costruttori</a>';
menu6[2]='<a href="../MONDOFIREBALL/velerie.htm">Velerie</a>';
menu6[3]='<a href="../MONDOFIREBALL/circoli.htm">Circoli Velici</a>';
menu6[4]='<a href="../MONDOFIREBALL/varie.htm">Attrezzature & Varie</a>';
menu6[5]='<a href="../MONDOFIREBALL/adelaide.htm">Cantiere AFM Adelaide</a>';
menu6[6]='<a href="../MONDOFIREBALL/veloscopo03.htm">Veloscopo</a>';
menu6[7]='<a href="../MONDOFIREBALL/calendario.htm">Calendario Fotografico</a>';
//menu 7 galleria
var menu7=new Array();
menu7[0]='<a href="../GALLERIA/immagini.php">Archivio Immagini</a>';
menu7[1]='<a href="../GALLERIA/filmati.htm">Archivio Filmati</a>';
menu7[2]='<a href="../GALLERIA/archivionotizie.htm">Archivio Notizie</a>';
menu7[3]='<a href="../GALLERIA/reportage_dht09.php">Decathlon Fiumicino 09</a>';
menu7[4]='<a href="../GALLERIA/reportage_dht08.php">Decathlon Moncalieri 08</a>';
menu7[5]='<a href="../GALLERIA/reportage_bb08.php">Boat Show Roma 08</a>';
menu7[6]='<a href="../GALLERIA/reportage.php">Boat Show Roma 07</a>';

//menu 8 area interattiva
var menu8=new Array();
menu8[0]='<a href="../GUESTBOOK/index.php">Guest Book</a>';
menu8[1]='<a href="../BACHECA/annunci.php">Bacheca Annunci</a>';
menu8[2]='<a href="../VERGHETTE/index.php">Chi C´è?.. in regata</a>';
menu8[3]='<a href="../SANTOMMASO/index.php">Santommaso Album</a>';
//menu8[1]='<a href="../AREAINTERATTIVA/forum.htm">Forum</a>';
//menu8[2]='<a href="../AREAINTERATTIVA/annunci.htm">Forum: Annunci</a>';
//menu8[3]='<a href="../AREAINTERATTIVA/imbarchi.htm">Forum: Imbarchi</a>';
//menu8[4]='<a href="../AREAINTERATTIVA/tecnica.htm">Forum: Tecnica</a>';
menu8[4]='<a href="../AREARISERVATA">Area Riservata</a>';
menu8[5]='<a href="../AREARISERVATA_NEW/login.php">Nuova Area Riservata</a>';
//menu 9 abbigliamento
var menu9=new Array();
menu9[0]='<a href="../LINEAABBIGLIAMENTO/linea.htm">La Linea Fireball-Italia</a>';
//menu9[1]='<a href="../LINEAABBIGLIAMENTO/vendita.htm">Modalità di Vendita</a>';
menu9[1]='<a href="../LINEAABBIGLIAMENTO/ordine.htm">Modulo d´Ordine</a>';

  
//fine indicizzazione	
var menuwidth='200px'; //default menu width
var menubgcolor='white' ; //menu bgcolor
var disappeardelay=50;  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no"; //hide menu when user clicks within menu?
var delayhide="";

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all;

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>');

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true;
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
	if (ie4&&!dropmenuobj.contains(e.toElement))
		delayhidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhidemenu();
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
	{
		dropmenuobj.style.visibility="hidden";
		//alert(e);
		restoreimg2();
		
	}
}
}

function delayhidemenu(){
if (ie4||ns6)
	delayhide=setTimeout("hidemenu()",disappeardelay);
}

function clearhidemenu(){
if (typeof delayhide!="undefined");
	clearTimeout(delayhide);
}


if (hidemenu_onclick=="yes")
document.onclick=hidemenu;
function cambiaimg(id)
{
/*	nome=id + "_f2.gif";
	document.getElementById(id).src="IMMAGINI/"+nome;
	*/
	for(i=0;i < voci.length;i++)
	{
		if(id!=voci[i])
		{
			nome=voci[i] + ".gif";
			document.getElementById(voci[i]).src="../SCRIPT/IMMAGINI/"+nome;
		}
		else
		{
			nome=id + "_f2.gif";
			document.getElementById(id).src="../SCRIPT/IMMAGINI/"+nome;
		}
	}
	
}
function restoreimg(id)
{}
function restoreimg2()
{
	for(i=0;i < voci.length;i++)
	{
		nome=voci[i] + ".gif";
		document.getElementById(voci[i]).src="../SCRIPT/IMMAGINI/"+nome;
	}
}
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function cambiaLogo()
{
//document.getElementById("front").src=ar[numeroGiorno];
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=cambiaLogo.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}


}

