function Controllo() {


var re_emptyall = new RegExp("^[ ]*$");
var re_not_number = new RegExp("[^0-9]");
var re_password = new RegExp("[^0-9a-zA-Z]");
var re_email = /^([a-zA-Z0-9])+([\.&a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/;

alert1 = "The field \"Request type\" is mandatory";
alert2 = "The field \"Company\" is wrong";
alert3 = "The field \"Name\" is mandatory";
alert4 = "The field \"Surname\" is mandatory";
alert5 = "The field \"Address\" is mandatory";
alert6 = "The field \"City\" is mandatory";
alert7 = "The field \"Post Code\" is mandatory";
alert8 = "The field \"Country\" is mandatory";
alert9 = "The field \"Nation\" is mandatory";
alert10 = "The field \"E-mail\" is mandatory";
alert11 = "The field \"Phone\" is wrong";
alert12 = "The field \"Request\" is mandatory";
alert13 = "You must authorize handling of your personal data.";

alert_number = "The field must contain only numbers";

	// Tipo richiesta *
	if ( document.forms[0].tipo.value == "") {
		alert(alert1);
		document.forms[0].tipo.focus();
		return;
	}
	
	// Ragione Sociale (se compilato)
	if (document.forms[0].azienda.value != '') {
		if (re_emptyall.test(document.forms[0].azienda.value)) {
			alert(alert2);
			document.forms[0].azienda.focus();
			return;
		}
	}
	
	// Nome *
	if ( (document.forms[0].nome.value=="") || (re_emptyall.test(document.forms[0].nome.value)) ) {
		alert(alert3);
		document.forms[0].nome.focus();
		return;
	}
	
	// Cognome *
	if ( (document.forms[0].cognome.value=="") || (re_emptyall.test(document.forms[0].cognome.value)) ) {
		alert(alert4);
		document.forms[0].cognome.focus();
		return;
	}
	
	// Indirizzo
	if (document.forms[0].indirizzo.value != '') {
		if ( (document.forms[0].indirizzo.value=="") || (re_emptyall.test(document.forms[0].indirizzo.value)) ) {
			alert(alert5);
			document.forms[0].indirizzo.focus();
			return;
		}
	}

	// CAP
	if (document.forms[0].cap.value != '') {
		if ( (document.forms[0].cap.value=="") || (re_emptyall.test(document.forms[0].cap.value)) ) {
			alert(alert7);
			document.forms[0].cap.focus();
			return;
		}
		
		if (re_not_number.test(document.forms[0].cap.value)) {
			alert(alert_number);
			document.forms[0].cap.focus();
			return;
		}
	}

	// Provincia
	if (document.forms[0].provincia.value != '') {
		if (document.forms[0].provincia.value=="") {
			alert(alert8);
			document.forms[0].provincia.focus();
			return;
		}
	}
	
	// Citta
	if (document.forms[0].citta.value != '') {
		if ( (document.forms[0].citta.value=="") || (re_emptyall.test(document.forms[0].citta.value)) ) {
			alert(alert6);
			document.forms[0].citta.focus();
			return;
		}
	}
	
	// Nazione
	if (document.forms[0].stato.value != '') {
		if (document.forms[0].stato.value == "") {
			alert(alert9);
			document.forms[0].stato.focus();
			return;
		}
	}
	
	// E-mail *
	if (!re_email.test(document.forms[0].mail.value)) {
		alert(alert10);
		document.forms[0].mail.focus();
		return;
	}

	// Telefono
	if (document.forms[0].telefono.value != '') {
		if (re_not_number.test(document.forms[0].telefono.value)) {
			alert(alert_number);
			document.forms[0].telefono.focus();
			return;
		}
	}
	
	// Richiesta *
	if ( (document.forms[0].richiesta.value == '') || (re_emptyall.test(document.forms[0].richiesta.value)) ) {
		alert(alert12);
		document.forms[0].richiesta.focus();
		return;
	}
	
	// Check privacy
	if (document.forms[0].privacy.checked==false) {
		alert(alert13);
		return;
	}
	
	document.forms[0].submit();

} // end function