function controllomodulo()
{    
     var categoria = document.modulo.categoria.value;
	 var ragsociale = document.modulo.ragsociale.value;
     var citta = document.modulo.citta.value;
     var indirizzo = document.modulo.indirizzo.value;
	 var email = document.modulo.email.value;
	 var password = document.modulo.password.value;
	 var telefono = document.modulo.telefono.value;
	 var privacy = document.modulo.privacy[0].checked;  
     // Espressione regolare dell'email
     var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
        //Effettua il controllo sul campo ragsociale
        if ((categoria == "SELEZIONA CATEGORIA")) {
           alert("Inserire il campo Categoria.");
           document.modulo.categoria.focus();
           return false;
		   }
		else if ((ragsociale == "") || (ragsociale == "undefined")) {
           alert("Il campo Ragione Sociale è obbligatorio.");
           document.modulo.ragsociale.focus();
           return false;
		   }
        //Effettua il controllo sul campo COGragsociale
        else if ((citta == "") || (citta == "undefined")) {
           alert("Il campo citta' è obbligatorio.");
           document.modulo.citta.focus();
           return false;
        }     
		 else if ((indirizzo == "") || (indirizzo == "undefined")) {
           alert("Il campo indirizzo è obbligatorio.");
           document.modulo.indirizzo.focus();
           return false;
        }     		 
        else if (!email_reg_exp.test(email) || (email == "") || (email == "undefined")) {
           alert("Inserire un indirizzo email corretto.");
           document.modulo.email.select();
           return false;
        }
		else if ((password == "") || (password == "undefined")) {
           alert("Il campo password è obbligatorio.");
           document.modulo.password.focus();
           return false;
        }     
		else if ((telefono == "") || (telefono == "undefined")) {
           alert("Il campo telefono è obbligatorio.");
           document.modulo.telefono.focus();
           return false;
        }     
		 else if (privacy == false) 
		 {alert("Devi accettare le condizioni sulla privacy!");
          document.modulo.privacy.checked.focus();
          return false;
        }	   
		        //INVIA IL MODULO
        else {
           document.modulo.action = "index.php?id=10";
           document.modulo.submit();   }
		   } //-->
