defaultStatus="© Solari Angelo Osvaldo - Via S. Lorenzo, 8 - 16040 Leivi - Tel. 0185 319200 - Fax 0185 319205";

function pop_up(url, nome, w, h, resize, barrastato, barraindirizzi, barrastrumenti, scroll, centered) {
if (centered == 1){ 
larghezza = (screen.width - w) / 2;
altezza = (screen.height - h) / 2;
}
else {
larghezza = 0;
altezza = 0;
}
props = 'height='+h+',width='+w+',top='+altezza+',left='+larghezza+',resizable='+resize+',status='+barrastato+',location='+barraindirizzi+',toolbar='+barrastrumenti+',scrollbars='+scroll+''
finestra = window.open(url, nome, props, centered);
}

function form_validator(theForm)
{
	if(theForm.nome.value == "") {
		 alert("Pregasi compilare il campo Nome.");
		 theForm.nome.focus();
		 return(false);
	}
	if(theForm.cognome.value == "") {
		 alert("Pregasi compilare il campo Cognome.");
		 theForm.cognome.focus();
		 return(false);
	}
	if(theForm.address.value == "") {
		 alert("Pregasi compilare il campo Indirizzo.");
		 theForm.address.focus();
		 return(false);
	}
	if(theForm.city.value == "") {
		 alert("Pregasi compilare il campo Cittą.");
		 theForm.city.focus();
		 return(false);
	}
	if(theForm.cap.value == "") {
		 alert("Pregasi compilare il campo C.A.P.");
		 theForm.cap.focus();
		 return(false);
	}
	if(theForm.cap.value.length < "5") {
		 alert("Il codice numerico digitato all\'interno del campo C.A.P. non risulta corretto.\nPregasi verificare la sintassi dei dati inseriti.");
		 theForm.cap.focus();
		 return(false);
	}
	if(!parseFloat(theForm.cap.value)) {
		 alert("Pregasi compilare correttamente il campo C.A.P.!");
		 theForm.cap.focus();
		 return(false);
	}
	if(document.theForm.provincia.options[document.theForm.provincia.selectedIndex].value == "selezionare") {
		 alert("Pregasi selezionare una opzione dal campo Provincia.");
		 document.theForm.provincia.focus();
		 return(false);
	}
	if(theForm.email.value == "") {
		 alert("Pregasi compilare il campo E-mail.");
		 theForm.email.focus();
		 return(false);
	}
	if (theForm.email.value.length < 6 || theForm.email.value.indexOf("@") == -1 || theForm.email.value.indexOf(".") == -1) {
	 	 alert("L\'indirizzo digitato all\'interno del campo E-mail non risulta corretto.\nPregasi verificare la sintassi dei dati inseriti.");
		 theForm.email.focus();
		 return false;
	}
	if(theForm.phone.value == "") {
		 alert("Pregasi compilare il campo Recapito telefonico.");
		 theForm.phone.focus();
		 return(false);
	}
	if(theForm.phone.value.length < "9") {
		 alert("Il codice numerico digitato all\'interno del campo Recapito telefonico non risulta corretto. Pregasi verificare la sintassi dei dati inseriti.");
		 theForm.phone.focus();
		 return(false);
	}
	if(!parseFloat(theForm.phone.value)) {
		 alert("Pregasi compilare correttamente il campo Recapito telefonico!");
		 theForm.phone.focus();
		 return(false);
	}
	if(document.theForm.argomento.options[document.theForm.argomento.selectedIndex].value == "selezionare") {
		 alert("Pregasi selezionare una opzione dal campo Oggetto.");
		 document.theForm.argomento.focus();
		 return(false);
	}
	if(theForm.richiesta.value.length == "") {
		 alert("Pregasi compilare il campo Vs. richiesta.");
		 theForm.richiesta.focus();
		 return(false);
	}
	if(theForm.richiesta.value.length > "500") {
		 alert("Pregasi utilizzare non pił di 500 caratteri.");
		 theForm.richiesta.focus();
		 return(false);
	}
	return (true);
}

function clear_all() {
document.theForm.reset();
}

function goTo(newURL) {
self.location.href=newURL;
}