function conf_agenti() {
		
     var nome  	   = document.agenti.nome.value;
     var cognome   = document.agenti.cognome.value;
     var telefono  = document.agenti.telefono.value;
     var email     = document.agenti.email.value;
     var messaggio = document.agenti.messaggio.value;     
     var mail_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;

		 if ((nome == "") || (nome == "Nome")) {
           alert("Il campo NOME è obbligatorio.");
           document.agenti.nome.focus();           
           return false;
        }

		else if ((cognome == "") || (cognome == "Cognome")) {
           alert("Il campo COGNOME è obbligatorio.");
           document.agenti.cognome.focus();           
           return false;
        }
		
		else if ((telefono == "") || (telefono == "Telefono")) {
           alert("Il campo TELEFONO è obbligatorio.");
           document.agenti.telefono.focus();           
           return false;
        }		

        else if (!mail_reg_exp.test(email) || (email == "") || (email == "E-Mail")) {
           alert("Inserire un indirizzo E-mail corretto.");
           document.agenti.email.focus();           
           return false;
        }
		
		else if ((messaggio == "") || (messaggio == "Messaggio")) {
           alert("Il campo MESSAGGIO è obbligatorio.");
           document.agenti.messaggio.focus();           
           return false;
        }
        else if (!document.agenti.autorizzazione.checked) {
           alert("Seleziona il consenso alla privacy."); 	   
           return false;
        }
        //INVIA IL modul
        else {
           document.agenti.submit();
        }
     
  }
  
function conf_aziende() {
		
     var ragsoc	   = document.aziende.ragsoc.value;
     var responsabile   = document.aziende.responsabile.value;
     var telefono  = document.aziende.telefono.value;
     var email     = document.aziende.email.value;
  
     var mail_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;

		 if ((ragsoc == "") || (ragsoc == "Ragione Sociale")) {
           alert("Il campo RAGIONE SOCIALE è obbligatorio.");
           document.aziende.ragsoc.focus();           
           return false;
        }

		else if ((responsabile == "") || (responsabile == "Responsabile")) {
           alert("Il campo RESPONSABILE è obbligatorio.");
           document.aziende.responsabile.focus();           
           return false;
        }
		
		else if ((telefono == "") || (telefono == "Telefono")) {
           alert("Il campo TELEFONO è obbligatorio.");
           document.aziende.telefono.focus();           
           return false;
        }		

        else if (!mail_reg_exp.test(email) || (email == "") || (email == "E-Mail")) {
           alert("Inserire un indirizzo E-mail corretto.");
           document.aziende.email.focus();           
           return false;
        }
		
        else if (!document.agenti.autorizzazione.checked) {
           alert("Seleziona il consenso alla privacy."); 	   
           return false;
        }
        //INVIA IL modul
        else {
           document.aziende.submit();
        }
     
  }  
