var ns6=document.getElementById&&!document.all
var ie=document.all

var dayarray=new Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato")
var montharray=new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre")


function change_page(iNumPage) {
	document.ricerca.num_page.value=iNumPage;
	document.ricerca.submit();
}

function reload_page() {
	document.ricerca.submit();
}


function CheckForm() {	
	if ((document.contatto.Nome.value == "") || (document.contatto.Cognome.value == "") || (document.contatto.Email.value == "")) {		
		if (document.contatto.language.value == "ita") {
		  alert('Impossibile inviare il modulo. Alcuni parametri sono necessari.');
		} else {
		  alert('Sorry, it was impossible to send the module. Some parameters are missing.');
		}
		return false;
	} else {
		if (document.contatto.trattamento_dati[0].checked == false) {
			if (document.contatto.language.value == "ita") {
				alert("Per continuare deve essere accettato il trattamento dei dati personali.");
			} else {
				alert("Continue to be accepted for the treatment of personal data.");
			}
			document.contatto.trattamento_dati[0].focus();
			return false;
		}
	  return true;
	}
}

function submit_page() {	
	if ((document.richiesta_immobile.nominativo.value == "") || (document.richiesta_immobile.Email.value == "") || (document.richiesta_immobile.testo_richiesta.value == "")) {		
		if (document.richiesta_immobile.language.value == "ita") {
		  alert('Impossibile inviare il modulo. Alcuni parametri sono necessari.');
		} else {
		  alert('Sorry, it was impossible to send the module. Some parameters are missing.');
		}
		return false;
	} else {
		if (document.richiesta_immobile.trattamento_dati[0].checked == false) {
			if (document.richiesta_immobile.language.value == "ita") {
				alert("Per continuare deve essere accettato il trattamento dei dati personali.");
			} else {
				alert("Continue to be accepted for the treatment of personal data.");
			}
			document.richiesta_immobile.trattamento_dati[0].focus();
			return false;
		}
	  return true;
	}
}
