	var myRequest = null;
	var myRequest2 = null;
	var myRequest3 = null;

	function CreateXmlHttpReq(handler) {
	  var xmlhttp = null;
	  try {
		xmlhttp = new XMLHttpRequest();
	  } catch(e) {
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
	  }
	  xmlhttp.onreadystatechange = handler;
	  return xmlhttp;
	}
	
	function myHandler() {
		if (myRequest.readyState == 4 && myRequest.status == 200) {
			document.getElementById("richiesta_info").innerHTML = myRequest.responseText;
		}
	}
	
	function myHandler2() {
		if (myRequest.readyState == 4 && myRequest.status == 200) {
			document.getElementById("richiesta_info2").innerHTML = myRequest.responseText;
		}
	}
	
	function invia() {
		var r = Math.random();		
		var ga = document.getElementById('ga').options[document.getElementById('ga').selectedIndex].value;
		var ma = document.getElementById('ma').options[document.getElementById('ma').selectedIndex].value;
		var aa = document.getElementById('aa').options[document.getElementById('aa').selectedIndex].value;
		var gp = document.getElementById('gp').options[document.getElementById('gp').selectedIndex].value;
		var mp = document.getElementById('mp').options[document.getElementById('mp').selectedIndex].value;
		var ap = document.getElementById('ap').options[document.getElementById('ap').selectedIndex].value;
		
		var adulti = document.getElementById('adulti').value;
		var bambini = document.getElementById('bambini').value;
		var singole = document.getElementById('singole').value;
		var matrimoniali = document.getElementById('matrimoniali').value;
		var nome = document.getElementById('nome').value;
		var telefono = document.getElementById('telefono').value;
		var posta = document.getElementById('posta').value;
		var privacy = document.getElementById('privacy').value;
		var trattamento = document.getElementById('trattamento').options[document.getElementById('trattamento').selectedIndex].value;
		myRequest = CreateXmlHttpReq(myHandler);
		myRequest.open("GET","/dformed.php?ga="+ga+"&ma="+ma+"&aa="+aa+"&gp="+gp+"&mp="+mp+"&ap="+ap+"&nome="+nome+"&posta="+posta+"&telefono="+telefono+"&trattamento="+trattamento+"&adulti="+adulti+"&bambini="+bambini+"&singole="+singole+"&matrimoniali="+matrimoniali+"&privacy="+privacy+"&rand="+escape(r));
		myRequest.send(null);
	}
	
	function invia2() {
		var r = Math.random();		
		var ga = document.getElementById('ga2').options[document.getElementById('ga2').selectedIndex].value;
		var ma = document.getElementById('ma2').options[document.getElementById('ma2').selectedIndex].value;
		var aa = document.getElementById('aa2').options[document.getElementById('aa2').selectedIndex].value;
		
		var adulti = document.getElementById('adulti2').value;
		var bambini = document.getElementById('bambini2').value;
		var nome = document.getElementById('nome2').value;
		var telefono = document.getElementById('telefono2').value;
		var posta = document.getElementById('posta2').value;
		var privacy = document.getElementById('privacy2').value;
		var trattamento = document.getElementById('trattamento2').value;
		myRequest = CreateXmlHttpReq(myHandler2);
		myRequest.open("GET","/dformed2.php?ga="+ga+"&ma="+ma+"&aa="+aa+"&nome="+nome+"&posta="+posta+"&telefono="+telefono+"&trattamento="+trattamento+"&adulti="+adulti+"&bambini="+bambini+"&privacy="+privacy+"&rand="+escape(r));
		myRequest.send(null);
	}
	
	function avvisoprivacy() {
   		var finestra = window.open("","Privacy","height=230,width=450");	
    	finestra.document.write("<h2>Informativa sulla Privacy.</h2>");
    	finestra.document.write("La informiamo che i dati da lei inseriti saranno trattati al solo fine di fornirle le informazioni richieste ed eventualmente, in caso di conferma, per definire la prenotazione alberghiera. I suoi dati saranno trattati con mezzi informatici nel rispetto dei principi stabiliti dal codice della Privacy (D. Legisl. 196/2003). Per ulteriori informazioni sulle modalità del trattamento, e per esercitare gli altri diritti a  lei riconosciuti dall'articolo 7 del Codice della Privacy, potraà rivolgersi al Titolare della struttura alberghiera.");
		finestra.document.close();

	}