campi=new Array();
campiURL=new Array();
bStato=new Array();
clrOn="#3366ff";  // Colore al passaggio del mouse
clrOff="#1c2f73"; // Colore normale
clrDwn="#333399"; // Colore della tendina
leftmargin=0;
topmargin=182;
largo=110;
Home = false; 		// Settare a "false" se non si desidera il link all'homepage
HomeLink = "/"; 	// URL della homepage
HomeText = "Home"; 	// Testo del link alla homepage
HomeWidth = 50; 	// Larghezza del livello che contiene il tasto alla homepage. (se "Home"= "false" viene azzerato.

function tendinaHide()	{
	if (conta==0)
		{
		accendiMenu(true)
		timer=setTimeout("accendiMenu(false)",200);
		timer=setTimeout("tendinaScendi(ultimo,false)",250);
		}
	}

function accendiMenu(col)	{
	colore=col?clrOn:clrDwn;
	for (i=0;i<campi.length;i++)
		for (j=1;j<campi[i].length;j++)
			{
		if (nn)
			document.layers["subM"+i+"."+j].bgColor=colore;
		else
			if(document.all)
				document.all["subM"+i+"."+j].style.background=colore;
			else
				document.getElementById('subM'+i+"."+j).style.background=colore;
			}
	}

function tendinaShow(n)	{
	tendinaScendi(ultimo,false);
	tendinaScendi(n,true);
	ultimo=n;
	}

function tendinaScendi(n,act)	{
	if (conta==0) {
		act?stat="visible":stat="hidden";
	if (nn)
		for (i=1;i<campi[n].length;i++)
			document.layers["subM"+n+"."+i].visibility=stat;
	else
		for (i=1;i<campi[n].length;i++)
			if(document.all)
				document.all["subM"+n+"."+i].style.visibility=stat;
			else
				document.getElementById('subM'+n+"."+i).style.visibility=stat;
		}
	}


function vai(dove,r,c)	{
	lev=nn?document.layers["subM"+r+"."+c]:(document.all)?document.all["subM"+r+"."+c].style:document.getElementById("subM"+r+"."+c).style;
	if (nn)	{
		lev.bgColor=clrOff;
		timer=setTimeout("lev.bgColor=clrOn",50)
		timer=setTimeout("lev.bgColor=clrOff",100)
		timer=setTimeout("lev.bgColor=clrOn",150)
		timer=setTimeout("lev.bgColor=clrOff",200)
		timer=setTimeout("lev.bgColor=clrOn",250)
		}
	else {
		lev.background=clrOff;
		timer=setTimeout("lev.background=clrOn",50)
		timer=setTimeout("lev.background=clrOff",100)
		timer=setTimeout("lev.background=clrOn",150)
		timer=setTimeout("lev.background=clrOff",200)
		timer=setTimeout("lev.background=clrOn",250)
		}
   if (navigator.userAgent.toLowerCase().indexOf("msie")!=-1 && navigator.platform.toLowerCase().indexOf("mac")=="mac")
	   document.write("")
	timer=setTimeout("self.location.href='"+dove+"'",350)
	}

function disattiva(l)	{
	LTop="voce"+l.substr(4,l.indexOf(".")-4)+".";
	nn?document.layers[LTop].bgColor=clrOff:(document.all)?document.all[LTop].style.background=clrOff:document.getElementById(LTop).style.background=clrOff;
	colore=clrOff
	if (l.length>6) colore=clrDwn
	nn?document.layers[l].bgColor=colore:(document.all)?document.all[l].style.background=colore:document.getElementById(l).style.background=colore;
	window.status="";
	}

function attiva(l)	{
	LTop="voce"+l.substr(4,l.indexOf(".")-4)+".";
	nn?document.layers[LTop].bgColor=clrOn:(document.all)?document.all[LTop].style.background=clrOn:document.getElementById(LTop).style.background=clrOn;
	nn?document.layers[l].bgColor=clrOn:(document.all)?document.all[l].style.background=clrOn:document.getElementById(l).style.background=clrOn;
	document.getElementById?document.getElementById(l).style.cursor=document.all?'hand':'pointer':'void(0)';
	if (l.substr(0,4)=="subM")
		stringa=bStato[l.substr(4,l.indexOf(".")-4)][l.substring(l.indexOf(".")+1,l.length)];
	else if (l.length>5)
			stringa=bStato[l.substr(4,l.indexOf(".")-4)][0];
		else stringa="Home Page";
	window.status=stringa;
	timer=setTimeout("window.status=stringa",20);
	}
nn=document.layers?true:false,N6=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1?true:false,conta=0,ultimo=0;
op=navigator.userAgent.toLowerCase().indexOf("opera")!=-1?true:false
HomeWidth=Home?HomeWidth:0;
campi[0]=new Array("About us");
campi[1]=new Array("Our Network");
campi[2]=new Array("Our Job");
campi[3]=new Array("Our Town");
campi[4]=new Array("Search");
campi[5]=new Array("Contact");
campiURL[0]=new Array("http://www.cnafe.it/english/chisiamo.htm")
campiURL[1]=new Array("http://www.cnafe.it/english/sistemacna.htm")
campiURL[2]=new Array("http://www.cnafe.it/english/serviziimpresa.htm")
campiURL[3]=new Array("http://www.cnafe.it/english/ferrara.htm")
campiURL[4]=new Array("http://www.cnafe.it/english/form.htm")
campiURL[5]=new Array("http://www.cnafe.it/english/contatti.htm")
bStato[0]=new Array("Il Sistema CNA di Ferrara","CNA Il miglior investimento per l'impresa","La Presidenza e la Direzione Provinciale","Le Strutture che compongono CNA","Gli Uffici CNA sul territorio","Come mettersi in contatto con CNA");
bStato[1]=new Array("I vantaggi di essere Socio della CNA","Associarsi a CNA: il Valore di una scelta","Presenta un Socio","Le promozioni offerte ai Soci","La Rivista dell'Artigianato e della Piccola Media Impresa");
bStato[2]=new Array("Tutti i vantaggi di essere in Internet","La vetrina delle imprese CNA","Pagina gratuita internet per i Soci CNA","Il Portale Regionale CNA-SIAER","I Servizi Internet");
bStato[3]=new Array("Tutti i Servizi per l'impresa","Servizi Gestionali","Servizi Fiscali","Lavoro","Previdenza","Ambiente","Informatica","Inizio Cessazioni Variazioni Attivitą","Privacy","SRL Artigiane","Firma Digitale","Servizi per lo Sviluppo","Credito","Insediamenti Produttivi");
bStato[4]=new Array("L'attivitą di Rappresentanza nelle diverse categorie","Edilizia","Legno-Arredamento","Artigianato Artistico e Restauro","Odontotecnici","Autoriparatori","Assomeccanica","Installatori e Manutentori","Federacconciatori","Federpalestre","Artigiani Pensionati","Accordi Sindacali di Categoria","I Comitati della CNA");
bStato[5]=new Array("Una guida aggiornata per lo Sviluppo delle imprese","Strumenti per lo Sviluppo delle Imprese","Gli Incentivi per le Imprese suddivisi per tipo","Fondi del Nuovo Obiettivo 2","Credito per le Imprese","Insediamenti Produttivi","Consulenza Gestionale e sulla qualitą","Servizi di Promozione della propria Azienda e dei propri Prodotti","Servizi per l'Internazionalizzazione delle Piccole e Medie Imprese");
MenuLength=HomeWidth+largo*campi.length;
BrowserWidth=nn||op?window.innerWidth:N6?document.width:document.body.clientWidth;
leftmargin=parseInt((BrowserWidth-MenuLength)/2);

if (nn)
	{
	if (Home)
		document.write("<LAYER NAME=voce. position=absolute left="+leftmargin+" top="+topmargin+" width="+HomeWidth+" height=15 clip=0,0,"+HomeWidth+",15 bgColor="+clrOff+" visibility=visible onMouseOver=tendinaScendi(ultimo,false);attiva('voce.') onMouseOut=disattiva('voce.') CLASS=menuNNb>&nbsp;<A HREF='"+HomeLink+"' CLASS=menuNNb>"+HomeText+"</A></LAYER>");
	for (i=0;i<campi.length;i++)
		{
		var n=i;
		document.writeln("<LAYER NAME=voce"+n+". position=absolute left="+eval(leftmargin+HomeWidth+largo*i)+" top="+topmargin+" width="+largo+" height=15 clip=0,0,"+largo+",15 bgColor="+clrOff+" visibility=visible onMouseOver=tendinaShow("+i+");attiva('voce"+i+".');conta++ onMouseOut=ultimo="+i+";disattiva('voce"+i+".');conta--><DIV ALIGN=center CLASS=menuNNb>&nbsp;<A HREF=javascript:attiva('voce"+i+".') CLASS=menuNNb>"+campi[i][0]+"</A></DIV></LAYER>");
		for (l=1;l<campi[i].length;l++)
			document.writeln("<LAYER NAME=subM"+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="+clrOff+" visibility=hidden onMouseOver=attiva('subM"+n+"."+l+"');conta++ onMouseOut=disattiva('subM"+n+"."+l+"');conta--  CLASS=menuNNb>&nbsp;<A HREF=javascript:attiva('subM"+n+"."+l+"') onClick=vai('"+campiURL[i][l]+"',"+i+","+l+") CLASS=menuNN>"+campi[i][l]+"</A></LAYER>");
		}
	}
	else
	{
	if (Home)
		document.write("<DIV ID=voce. STYLE=\"position:absolute;left:"+leftmargin+";top:"+topmargin+";width:"+HomeWidth+";height:15;background:"+clrOff+";visibility:visible;cursor:hand\" onMouseOver=tendinaScendi(ultimo,false);attiva('voce.') onMouseOut=disattiva('voce.')><A HREF='"+HomeLink+"' CLASS=menuIEb onFocus=this.blur()>&nbsp;"+HomeText+"</A></DIV>");
	for (i=0;i<campi.length;i++)
		{
		var n=i;
		document.writeln("<DIV ID=voce"+n+". STYLE=\"position:absolute;left:"+eval(leftmargin+HomeWidth+largo*i)+";top:"+topmargin+";width:"+largo+";height:15;background:"+clrOff+";visibility:visible;cursor:hand\" onMouseOver=tendinaShow("+n+");attiva('voce"+n+".');conta++ onMouseOut=ultimo="+n+";disattiva('voce"+n+".');conta-- onClick=self.location.href='"+campiURL[i][0]+"';><DIV ALIGN=center CLASS=menuIEb>&nbsp;"+campi[i][0]+"</DIV></DIV>");
		for (l=1;l<campi[i].length;l++)
			document.writeln("<DIV ID=subM"+i+"."+l+" STYLE=\"position:absolute;left:"+eval(leftmargin+HomeWidth+largo*i)+";top:"+eval(topmargin+15*l)+";width:"+largo+";height:15;background:"+clrDwn+";visibility:hidden;cursor:hand\" onMouseOver=;attiva('subM"+n+"."+l+"');conta++ onMouseOut=disattiva('subM"+n+"."+l+"');conta-- CLASS=menuIE onClick=vai('"+campiURL[i][l]+"',"+i+","+l+")>&nbsp;"+campi[i][l]+"</DIV>");
		}
	}

timer=setInterval("tendinaHide()",900)
