function cambia(idTd, idA){		//alert(document.getElementById[idTd].className);	//document.getElementById[idTd].className = "linkclick";		if (document.all) {		for (i=1; i<=7;i++){			document.all['idTd'+i].className="link";		}		document.all[idTd].className = "linkclick";	}	else{		for (i=1; i<=7;i++){			document.getElementById('idTd'+i).className = "link";		}		//nomeClass = document.getElementById(idTd).className;		document.getElementById(idTd).className = "linkclick";	}		if(document.all){		for (i=1; i<=7;i++){			document.all['idA'+i].className="link";		}		document.all[idA].className = "linkclick";		}	else{		for (i=1; i<=7;i++){			document.getElementById('idA'+i).className = "link";		}		//nomeClass = document.getElementById(idTd).className;		document.getElementById(idA).className = "linkclick";	}	cambiaAreaRiservata();	}function cambiaAreaRiservata(){		//alert(document.forms[0].UserName.value);	if (document.forms[0].UserName.value != "Anonymous"){		document.getElementById('idTd7').className = "linkclickar";		document.getElementById('idA7').className = "linkclickar";	}	}function ripristina(){		if (document.all) {		for (i=1; i<=7;i++){			document.all['idTd'+i].className="link";			document.all['idA'+i].className="link";		}		//document.all[idTd].className = "linkclick";	}	}function apriFrameset( voceMenu ){	//alert(voceMenu);	// apro il frameset per la creazione del men\u00F9 Valex Live e il corpo centrale	if(voceMenu=="live"){		parent.corpo.location.href="webFrameset?OpenForm&menu=live&1=1";	}	}function apriPagineWeb( keyPagina ){	var url = "";	if (keyPagina=="promo"){		var data = new Date();		var giorno = data.getDay();		var arrayPagina = new Array("|02","|02A","|02B","|02","|02A","|02B","|02");		var pagina = arrayPagina[giorno];		//url = "webFrameset?OpenForm&"+"001"+ pagina + "|I|pagine";		url = "PagineWeb/I" + pagina + "?OpenDocument";		body1.location.href=url;	} else if (keyPagina == 'ultimiarrivi'){		if (document.forms[0].UserName.value == 'Anonymous'){			//url = "PagineWeb/I|ultimiarrivi?OpenDocument";			url = "/servlet/ServletUltimiArrivi?nomeDBprod=" + document.forms[0].nomeDBProdotti.value +													"&nomeDBclienti=" + document.forms[0].DBClienti.value +  													"&nomeDBlistini=" + document.forms[0].DBListini.value +  													"&nomeDBimg=" + document.forms[0].nomeDBImg.value +  													"&nomeServer=" + document.forms[0].nomeServer.value +													"&lingua=" + document.forms[0].lingua.value +													"&codCatalogo=" + document.forms[0].catalogo.value +													"&dispo=" + document.forms[0].Flgdis.value +													"&tipoAccesso=anonimo";			//alert("url: " + url);			body1.location.href = url;		}else{			url = "webAreaRiservata?OpenForm";			body1.location.href = url;		} 	}else {		url = "PagineWeb/" + keyPagina + "?OpenDocument";		parent.corpo.location.href= url;		}	}// FUNZIONE PER CAMBIARE L'HOME DEL SITO A SECONDA DEI GIORNI DELLA SETTIMANAfunction cambiaPagina( codice ){		if (codice=="1"){		var data = new Date();		var giorno = data.getDay();		var arrayPagina = new Array("|02","|02A","|02B","|02","|02A","|02B","|02");		var pagina = arrayPagina[giorno];				//url = "webHomePage?OpenForm&"+document.forms[0].lingua.value+ pagina;		url = "webHomePage?OpenForm&"+"I"+ pagina;		//parent.corpo.location.href="webHomePage?OpenForm&"+document.forms[0].lingua.value+"|02";		body1.location.href=url;	} 	else if (codice == 'menu10'){		url = "PagineWeb/I|ultimiarrivi?OpenDocument"		body1.location.href = url;	}	else if (codice=="4"){		if (document.forms[0].UserName.value == 'Anonymous'){			url = "PagineWeb/I|ultimiarrivi?OpenDocument"			body1.location.href = url;		}else{			url = "webAreaRiservata?OpenForm"			body1.location.href = url;		}			} else if (codice=="5"){		url = "PagineWeb/I|puntovendita?OpenDocument"		body1.location.href = url;			} else if ( codice=="6") {		// se tipo = 6 allora apro la pagina per visualizzare i centri di assistenza		if  (document.forms[0].nazione.value=='005') {			body1.location.href="CentriAssistenza?OpenForm";		}		else{				if (document.forms[0].testclienti.value=='1') {				body1.location.href="/" + document.forms[0].DBClienti.value + "/CentriAssistenza?OpenView&RestrictToCategory=" + document.forms[0].nazione.value;					}			else {				body1.location.href="blank?OpenPage";			}		}		} else if ( codice == '7'){		//alert(document.forms[0].UserName.value);		if ( document.forms[0].UserName.value == 'Anonymous') {			url = "webLogin?OpenForm";		}else{				url = "webAreaRiservata?OpenForm&" + document.forms[0].lingua.value;		}		body1.location.href = url		// LINK PER PAGINA DI RICERCA PRODOTTI;	} else if( codice =="2_2"){		body1.location.href="webRicerca?OpenForm&"+document.forms[0].lingua.value +"|001";	}	}function apriPagina(lingua,key){	body1.location.href="webHomePage?OpenForm&"+lingua+"|" + key;}function valuta( codice){// se tipo = 0 allora apro la home page		if(codice=="0"){		parent.corpo.location.href="webHomePage?OpenForm&"+document.forms[0].lingua.value+		"|01|02|03|04";	}// se codice = 1 allora apro Pagina Vuota	if(document.forms[0].cod.value=="1"){		url = "/"+document.forms[0].DB.value+"/PaginaWeb_Azienda"+                 document.forms[0].lingua.value+"?OpenForm";		body1.location.href = url;	}// se tipo = 2 allora apro Pagina Vuota	if(document.forms[0].cod.value=="2"){		parent.corpo.location.href="webHomePage?OpenForm&"+document.forms[0].lingua.value+		"|02";	}	//if(document.forms[0].cod.value=="3"){	//	parent.corpo.location.href="WebProdottiFam?OpenView";	//}		//if(document.forms[0].cod.value=="4"){	//	parent.corpo.location.href="WebProdottiProf?OpenView";	//}		//if(document.forms[0].cod.value=="5"){	//	parent.corpo.location.href="WebProdottiNuovi?OpenView";	//}// se tipo = 6 allora apro pagina per prodotti in promozione	if(document.forms[0].cod.value=="6"){		parent.corpo.location.href="/"+document.forms[0].DBPromo.value+ 		"/WebTestataPromo?OpenView";	}// se tipo = 7 allora apro pagina per la ricerca prodotti	if(document.forms[0].cod.value=="7"){		parent.corpo.location.href="webRicerca?OpenForm&"+document.forms[0].lingua.value +		"|"+document.forms[0].codCat.value;	}// se tipo = 8 allora apro la pagina per la ricerca ricambi	if(document.forms[0].cod.value=="8"){		parent.corpo.location.href="webRicercaRicambi?OpenForm&"+document.forms[0].lingua.value +		"|"+document.forms[0].codCat.value;	}// se tipo = 9 allora apro la pagina per visualizzare i centri di assistenza	if ( (document.forms[0].cod.value=="9") ) {			if  (document.forms[0].nazione.value=='005') {			parent.corpo.location.href="CentriAssistenza?OpenForm";		}		else{				if (document.forms[0].testclienti.value=='1') {				parent.corpo.location.href="/" + document.forms[0].DBClienti.value + "/CentriAssistenza?OpenView&RestrictToCategory=" + document.forms[0].nazione.value;					}			else {				parent.corpo.location.href="blank?OpenPage";			}		}		}// se tipo = 10 allora apro la pagina per entrare nell'area riservata	if(document.forms[0].cod.value=="10"){		if ( utente == 'Anonymous') {			parent.corpo.location.href="webLogin?OpenForm&"+document.forms[0].lingua.value+"|"+document.forms[0].codCat.value+"|"+document.forms[0].cod.value+"|";		} else {			parent.corpo.location.href="webAreaRiservata?OpenForm&"+document.forms[0].lingua.value;		}	}// se tipo = 11 allora apro la pagina dell'area riservata	if(document.forms[0].cod.value=="11"){		if ( utente == 'Anonymous') {			parent.corpo.location.href="webLogin?OpenForm&"+document.forms[0].lingua.value+"|"+document.forms[0].codCat.value+"|"+document.forms[0].cod.value+"|";		} 	}		// se tipo = 15 allora apro la pagina della richiesta informazioni	if(document.forms[0].cod.value=="15"){		parent.corpo.location.href="webInformazioni"+lingua+"?OpenForm&"+lingua;	}	// se tipo = 16 allora apro la pagina 16		if(document.forms[0].cod.value=="16"){		parent.corpo.location.href="webHomePage?OpenForm&"+document.forms[0].lingua.value+		"|16";	}	// se tipo = 17 allora apro i prodotti sostituibili	if(document.forms[0].cod.value=="17"){			parent.corpo.location.href="/" + document.forms[0].DBClienti.value + "/WebStatistiche/SOST"+document.forms[0].lingua.value+"?OpenDocument";			}}function apriFramesetPagine( codice ){	var url =  "webFrameset?OpenForm&001|" + codice + "|" + document.forms[0].lingua.value + "|pagine";	body1.location.href = url;}function caricaRicerca(){	var codice = document.forms[0].codice.value;	var nascondi = document.forms[0].nascondi.value;	var lingua = document.forms[0].lingua.value;	var catalogo = document.forms[0].catalogo.value;	var rif_scheda = document.forms[0].rif_scheda.value;		if(rif_scheda != ''){		parent.corpo.location.href = "WebScheda/" + rif_scheda + "?OpenDocument&I|001";	}else{		if (codice == "prodotti"){			parent.corpo.location.href = "webRicerca?OpenForm&" + lingua + "|" + catalogo + "|" + nascondi;		} else if (codice == "ricambi"){			parent.corpo.location.href = "webRicercaRicambi?OpenForm&" + lingua + "|" + catalogo;		}	}}function ApriManuale(codice) {		var url = "/"+document.forms[0].nomeDBImgweb.value+"/(telwinall)/"+codice +"/$File/"+codice +".pdf?OpenElement";		if (window.navigator.appName == "Microsoft Internet Explorer") {		window.open(url,'','left=0, top=0, resize=yes, scrollbars=yes, menubar, width=750, height=500');     	}	else if (window.navigator.appName == 'Netscape') { 		window.open( url ,'', 'menubar');                                         	}     	}
