	function apriLink(link) {
		window.navigate(link);
	}

///////////////////////////////////////////////////////////////////////////////

	function apriZona(idzona) {
	   var sstr = "zonericette.asp?zona=1&pagina=zone&percorso=" + idzona;
	   window.navigate(sstr);
	}
	
///////////////////////////////////////////////////////////////////////////////

	function illuminazona() {
		var obj = window.event.srcElement.id
		document.frames("frame_zone").document.getElementById(obj).style.background="#ffd271"
		obj = ""
	}

///////////////////////////////////////////////////////////////////////////////
	
	function spegnizona() {
		var obj = window.event.srcElement.id
		document.frames("frame_zone").document.getElementById(obj).style.background="#FFFFCC"
		obj = ""
	}	

///////////////////////////////////////////////////////////////////////////////

	function ricerca_azienda() {
		svuotaDiv()
		docxml.load("xml_ric_aziende.asp");
		carica_tipologie_aziende();
	}

///////////////////////////////////////////////////////////////////////////////
	
	function ricerca_prodotto(lingua) {
		svuotaDiv()
		docxml.load("xml_ric_prodotti.asp");
		carica_tipologie_prodotti(lingua);
	}

///////////////////////////////////////////////////////////////////////////////
	
	function svuotaDiv() {
		document.getElementById("txtTarget").innerHTML = ""
		document.getElementById("divregioniprovinceaziende").innerHTML = ""
		document.getElementById("divregioniprovinceprodotti").innerHTML = ""
	}
	
///////////////////////////////////////////////////////////////////////////////

	function navigaTracciabilita() {
		var valore = document.getElementById("txtRicercaTracciabilita").value;
		if (valore == "") {alert("Inserire in numero di lotto");return;}
		var str = "schedaprodotto.asp?pagina=schedaprodotto&txttracciabilita=" + valore
		window.navigate(str);
	}

///////////////////////////////////////////////////////////////////////////////

	function navigaDemoTracciabilita() {
		var valore = "00101020401"
		//var valore = "120602"
		var str = "schedaprodotto.asp?pagina=schedaprodotto&txttracciabilita=" + valore
		window.navigate(str);
	}
	
///////////////////////////////////////////////////////////////////////////////

	function illumina(tipo) {
		if (tipo == 1){window.event.toElement.style.color="#97D6F7";}
		if (tipo == 2){window.event.toElement.style.color="#063668";}
		if (tipo == 3){window.event.toElement.style.color="#a41506";}
		if (tipo == 4){window.event.toElement.style.color="gray";}
	}

///////////////////////////////////////////////////////////////////////////////

	function spegni(tipo) {
		if (tipo == 1){window.event.fromElement.style.color="#F7B310";}
		if (tipo == 2){window.event.fromElement.style.color="#000000";}
		if (tipo == 3){window.event.fromElement.style.color="#063668";}
		if (tipo == 4){window.event.fromElement.style.color="#d63602";} //rosso
		if (tipo == 5){window.event.fromElement.style.color="#a41506";} //mattone
	}

///////////////////////////////////////////////////////////////////////////////

	function aperturafinestra(testo) {
		window.showModelessDialog("frmextrainfo.asp?testo=" + testo,"","");
	}

///////////////////////////////////////////////////////////////////////////////

/*
	var oPop = window.createPopup();
	function mostra(str) {
		var oPopBody = oPop.document.body;
		oPopBody.style.backgroundColor="lightyellow";
		oPopBody.style.textAlign="justify";
		oPopBody.style.paddingLeft="10"
		oPopBody.style.paddingRight="10"
		oPopBody.style.paddingTop="10"
		oPopBody.style.paddingBottom="10"
		oPopBody.innerHTML = str;	
		//coordinate: left, top, width, heigth
		oPop.show(200,200,200,200,document.body);
	}
*/

///////////////////////////////////////////////////////////////////////////////

	function mostra(str){
		window.showModalDialog("popUp.html",str,"status=no;dialogwidth=300px;dialogheight=350px;")
	}

///////////////////////////////////////////////////////////////////////////////

	function accendiMusica() {
		var valore = trovavalori();
		if (valore == 1) {
			var str = window.location
			str = str + "?musica=1"
		}
		if (valore == 2) {
			var s = new String(window.location)
  			var ss = s.split("musica");
			str = ss[0]
			var carattere = ss[0].slice(ss[0].length - 1)
			if (carattere == "&") {var str = ss[0] + "musica=1"}
			if (carattere == "?") {var str = ss[0] + "musica=1"}
			if (carattere != "?" && carattere != "&") {var str = ss[0] + "&musica=1"}
		}
		window.navigate(str);
	}

///////////////////////////////////////////////////////////////////////////////

	function LinguaItaliana() {
		var valore = trovavalori();
		if (valore == 1) {
			var str = window.location
			str = str + "?lingua=I"
		}
		if (valore == 2) {
			var s = new String(window.location)
  			var ss = s.split("lingua");
			str = ss[0]
			var carattere = ss[0].slice(ss[0].length - 1)
			if (carattere == "&") {var str = ss[0] + "lingua=I"}
			if (carattere == "?") {var str = ss[0] + "lingua=I"}
			if (carattere != "?" && carattere != "&") {var str = ss[0] + "&lingua=I"}
		}
		window.navigate(str);
	}

///////////////////////////////////////////////////////////////////////////////

	function LinguaTedesca() {
		var valore = trovavalori();
		if (valore == 1) {
			var str = window.location
			str = str + "?lingua=D"
		}
		if (valore == 2) {
			var s = new String(window.location)
	  		var ss = s.split("lingua");
			str = ss[0]
			
			var carattere = ss[0].slice(ss[0].length - 1)
			
			if (carattere == "&") {var str = ss[0] + "lingua=D"}
			if (carattere == "?") {var str = ss[0] + "lingua=D"}
			if (carattere != "?" && carattere != "&") {var str = ss[0] + "&lingua=D"}
		}
		window.navigate(str);
	}

///////////////////////////////////////////////////////////////////////////////

	function spegniMusica() {
		var valore = trovavalori();
		if (valore == 1) {
			var str = window.location
			str = str + "?musica=0"
		}
		if (valore == 2) {
			var s = new String(window.location)
	  		var ss = s.split("musica");
			str = ss[0]
			var carattere = ss[0].slice(ss[0].length - 1)
			if (carattere == "&") {var str = ss[0] + "musica=0"}
			if (carattere == "?") {var str = ss[0] + "musica=0"}
			if (carattere != "?" && carattere != "&") {var str = ss[0] + "&musica=0"}
		}
		window.navigate(str);
	}

///////////////////////////////////////////////////////////////////////////////

	function trovavalori() {
	  var s = new String(window.location);
	  var ss = s.split("?");  
	  return(ss.length);
	}

///////////////////////////////////////////////////////////////////////////////

	function playVideo(quale){
		var sstr = "MediaPlayer" + quale
		var obj = document.getElementById(sstr)
		window.showModalDialog("popUpGalleria.asp?percorso=" + obj.value,"","status=no;dialogwidth=300px;dialogheight=350px;")
//		obj.style.visibility='visible';
//		obj.play();
	}

///////////////////////////////////////////////////////////////////////////////

	function stopVideo(quale){
//		var sstr = "MediaPlayer" + quale
//		var obj = document.getElementById(sstr)
//		obj.style.visibility='hidden';
//		obj.stop();
	}
	
///////////////////////////////////////////////////////////////////////////////

	function muoviFrameGiu(){
			var obj = document.frames("framezonericette")
			obj.scrollBy(0,20);
			obj = ""
	}

///////////////////////////////////////////////////////////////////////////////

	function muoviFrameSu() {
			var obj = document.frames("framezonericette")
			obj.scrollBy(0,-20);
			obj = ""
	}

///////////////////////////////////////////////////////////////////////////////


