// funzione creazione menu dinamico
function dynMenu(){

	var domMenu 		= document.getElementById('sub-nav');
	var listMenu 		= domMenu.getElementsByTagName('li');
	var listMenuLength 	= listMenu.length;

	for (i=0;i<listMenuLength;i++){
		var obj = listMenu[i];
		var objName = obj.id;
		if (objName == path){
			document.getElementById(objName).className ="menuOn";
		}
	}


}

// cufon
Cufon.replace('h1', { fontFamily: 'OCR A Tribute Com' });
Cufon.replace('h2', { fontFamily: 'OCR A Tribute Com' });
Cufon.replace('h3', { fontFamily: 'OCR A Tribute Com' });

// funzione layer per link SERVIZI ATTIVI nel percorso tecnica - mobile - servizi
function showDetails(ch){
 	if (ch == 'on'){
 		$("#dettagli").slideDown("slow");
		document.getElementById('dettagliTitle').style.display='none';
 		document.getElementById('dettagliTitleOff').style.display='';
	}
	else  {
		$("#dettagli").slideUp("slow");
 		document.getElementById('dettagliTitle').style.display='';
 		document.getElementById('dettagliTitleOff').style.display='none';
	}
}

function expandSitofonoAss(){
	bodyW 	= document.documentElement.clientWidth;
	marLeft  = (bodyW - 600)/2;
	bodyH = document.documentElement.clientHeight;
	marTop = (bodyH - 273)/2;
	page = "./callback/index.php";
	newwin = window.open(page,"Assistenza", 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,status=no,width=600,height=347,top='+marTop+',left='+marLeft);
}

function expandSitofono(prod,tec,type){

                bodyW                 = document.documentElement.clientWidth;

                marLeft               = (bodyW - 600)/2;

                bodyH                  = document.documentElement.clientHeight;

                marTop                = (bodyH - 273)/2;

                page                     = "http://abbonati.tiscali.it/inc/etc/help/index.php?prod="+prod+"&tec="+tec+"&type="+type;

                newwin               = window.open(page,"abbonati", 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,status=no,width=600,height=357,top='+marTop+',left='+marLeft);

}

