function Modulo() {
     // Variabili associate ai campi del modulo
	 var azienda = document.modulo.azienda.value;
	 var nome = document.modulo.nome.value;
	 var cognome = document.modulo.cognome.value;
	 var localita = document.modulo.localita.value;
     var email = document.modulo.email.value;
	 
     // Espressione regolare dell'email
     var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
	 

        if ((azienda == "") || (azienda == "undefined")) {
           alert("Il campo azienda è obbligatorio.");
           document.modulo.azienda.focus();
           return false;
        }

        if ((nome == "") || (nome == "undefined")) {
           alert("Il campo nome è obbligatorio.");
           document.modulo.nome.focus();
           return false;
        }

        if ((cognome == "") || (cognome == "undefined")) {
           alert("Il campo cognome è obbligatorio.");
           document.modulo.cognome.focus();
           return false;
        }

        if ((localita == "") || (localita == "undefined")) {
           alert("Il campo località è obbligatorio.");
           document.modulo.localita.focus();
           return false;
        }
		//Effettua il controllo sul campo EMAIL
        else if (!email_reg_exp.test(email) || (email == "") || (email == "undefined")) {
           alert("Inserire un indirizzo E-mail corretto.");
           document.modulo.email.select();
           return false;
        }
	
        //INVIA IL MODULO
        else {
           document.modulo.action = "inviamail.asp";
           document.modulo.submit();
        }
  }

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
