function GestionePreferiti(id){



				if (window.XMLHttpRequest) {
				ricercaxx = new XMLHttpRequest();
				ricercaxx.onreadystatechange = 	function (){
				if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
				strRes=ricercaxx.responseText;
				if(strRes=="1"){
AlertOpen("Attenzione! Non si possono inserire pił di 5 preferiti.",2);

				return;
				}
				if(strRes=="2"){

AlertOpen("Attenzione! Preferito gią presente in lista.",2);

				return;
				}
				document.forma.action = "";
				document.forma.submit();
				}
				}
				ricercaxx.open("GET", "ax_gestionepreferiti.php?id=" + id  + "&rand=" + Math.random() ,true);
				ricercaxx.send(null);
				} else if (window.ActiveXObject) {
				ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
				if (ricercaxx) {
				ricercaxx.onreadystatechange = 	function (){
				if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
				strRes=ricercaxx.responseText;
				if(strRes=="1"){
AlertOpen("Attenzione! Non si possono inserire pił di 5 preferiti.",2);
				return;
				}
				if(strRes=="2"){
AlertOpen("Attenzione! Preferito gią presente in lista.",2);
				return;
				}
				document.forma.action = "";
				document.forma.submit();
				}
				ricercaxx.open("GET", "ax_gestionepreferiti.php?id=" + id + "&rand=" + Math.random() ,true);
				ricercaxx.send(null);}}


			}
			} 




function EliminaPreferito(id){



				if (window.XMLHttpRequest) {
				ricercaxx = new XMLHttpRequest();
				ricercaxx.onreadystatechange = 	function (){
				if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
				strRes=ricercaxx.responseText;
				document.forma.action = "";
				document.forma.submit();
				}
				}
				ricercaxx.open("GET", "ax_eliminapreferito.php?id=" + id  + "&rand=" + Math.random() ,true);
				ricercaxx.send(null);
				} else if (window.ActiveXObject) {
				ricercaxx = new ActiveXObject("Microsoft.XMLHTTP");
				if (ricercaxx) {
				ricercaxx.onreadystatechange = 	function (){
				if (ricercaxx.readyState == 4 && ricercaxx.status == 200) { 
				strRes=ricercaxx.responseText;
				document.forma.action = "";
				document.forma.submit();
				}
				ricercaxx.open("GET", "ax_eliminapreferito.php?id=" + id + "&rand=" + Math.random() ,true);
				ricercaxx.send(null);}}


			}
			}

