<!--

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
   var obj = document.layers ? document.layers[szDivID] :   
   document.getElementById ?  document.getElementById(szDivID).style :
   document.all[szDivID].style;
   obj.visibility = document.layers ? (iState ? "show" : "hide") :
   (iState ? "visible" : "hidden");
}

if(top == self){
  if (numtop!=0 && numsub!=0) {
     location.replace("../page.asp?pg="+numtop+"/"+numsub+".asp")
     }
  else {
     location.replace("../home/10.asp")
     }
  }

nome=this.document.URL.split("/");
nome2=nome[nome.length-1].toUpperCase()
if (typeof(nome[nome.length-3])!='undefined')
	{linguaattuale=nome[nome.length-3].toUpperCase()}
else
	{linguaattuale=''}

switch (linguaattuale) { //§§§
	case 'ITA': setLang(0);break
	case 'ENG': setLang(1);break
	case 'FRA': setLang(2);break
	case 'RUS': setLang(3);break
	case 'POR': setLang(4);break
	case 'DEU': setLang(5);break
	case 'ESP': setLang(6);break
	default: linguaattuale='ITA';setLang(0);
		 if (this.document.URL.toUpperCase().indexOf('/ENG/')!=-1){linguaattuale='ENG';setLang(1)}
		 if (this.document.URL.toUpperCase().indexOf('/FRA/')!=-1) {linguaattuale='FRA';setLang(2)}
		 if (this.document.URL.toUpperCase().indexOf('/POR/')!=-1) {linguaattuale='POR';setLang(4)}
		 break;
}

// ******* update navigation bar
pb=unescape(location.href)
pa=pb.split('/')
pc=pa[2]
if (pc.substr(0,3).toUpperCase()!='WWW') pc=pc+'/'+pa[3]+'/'+pa[4]
newloc='http://'+pc+'/'+linguaattuale+'/navigation.asp?numtop='+numtop+'&numsub='+numsub
if (typeof(param1)!='undefined') newloc=newloc+'&param1='+param1
top.navigation.location.replace(newloc)

//alert(location.protocol + '//' + location.host + location.pathname.substring(0,location.pathname.lastIndexOf('/')))
//top.navigation.location.href=top.navigation.location.href // update navigation bar

function ev() {
	if (top.menuframe.loaded==1) {
		top.menuframe.evidenzia("voce"+numtop,1);
		}
	else setTimeout('ev()',30)
}
setTimeout('ev()',30)

// ********** controllo se si deve cambiare il menu laterale a sinistra

nome12=top.leftmenu.document.URL.split("/");
nome22=nome12[nome12.length-1].toUpperCase()
if (nome22!='LEFTMENU'+numtop+'.ASP') {
   var tmp01=''
   var tmp02=top.centerframe.location.pathname;   
   var nomebis = tmp02.substring(tmp02.lastIndexOf('/') + 1).toUpperCase()
   // caso particolare: se è visualizzata la ricerca
   // gli faccio visualizzare il menu (vuoto) della
   // parte 'registrazione'
   if (nomebis=='RICERCA.ASP') tmp01='registrazione/'
   eval("top.leftmenu.location.replace(tmp01+'leftmenu"+numtop+".asp')")
}



//top.navigation.location.reload()
// top.navigation.location.href=top.navigation.location.href

// ***********


function setLang(l) {
	if (top.menuframe.loaded==1) {
		top.menuframe.document.lang.language[l].selected=true
		}
	else {setTimeout("setLang("+l+")",40);}
}

function evid() {
 if (numtop!="1" && numtop!="8" && numtop!="9" && numtop+numsub!='310') {
    nome=top.leftmenu.document.URL.split("/");
    nome=nome[nome.length-1].toUpperCase()    
    if ((top.leftmenu.loaded==1) && (nome=='LEFTMENU'+numtop+'.ASP')) {  
      top.leftmenu.switchmenu('sub'+numsub.substring(0,1))    
      if (numsub.substring(1,2)!="0") {
	 top.leftmenu.activate('a'+numsub)
	 }         
      }
    else {setTimeout("evid()",30);}
    }
}


function openpopup(c) {
    window.open('../popup.asp?c='+escape(c),'','status=no,toolbar=no,scrollbars=yes,width=300,height=300')
    return false
}

function openvideopop(page,w,h) {
  larghezza=(screen.width-w)/2;
  if (h==0){ h=(screen.height-100);}
  popopened=1;
  pop=open(page,'popup','width='+w+',height='+h+',left='+larghezza+',top=10,screenX='+larghezza+',screenY=0,scrollbars=yes,resizable=yes');
}

popopened=0;
function closevideopop() {
  if (popopened==1) {
    pop.close();
    popopened=0;
  }
}

function trim(stringa)
{
while (stringa.substring(0,1) == ' '){
	stringa = stringa.substring(1, stringa.length);
	}
while (stringa.substring(stringa.length-1, stringa.length) == ' '){
	stringa = stringa.substring(0,stringa.length-1);
	}
return stringa;
}

setTimeout("evid()",100);


//-->