function form_RegUtenti(theForm)
{

  if (theForm.Cognome.value == "")
  {
    alert("Compilare il campo Cognome");
    theForm.Cognome.focus();
    return (false);
  }
     if (/@/.test(theForm.Cognome.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Cognome");
    theForm.Cognome.focus();
    return (false);
  }

  if (theForm.Nome.value == "")
  {
    alert("Compilare il campo Nome");
    theForm.Nome.focus();
    return (false);
  }
     if (/@/.test(theForm.Nome.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Nome");
    theForm.Nome.focus();
    return (false);
  }


    if (theForm.Email.value == "")
  {
    alert("Compilare il campo Email");
    theForm.Email.focus();
    return (false);
  }


 if (theForm.Email.value.length < 7)
  {
    alert("L'email inserita non č corretta");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.indexOf("@") == -1)
  {
    alert("manca il carattere @ nella Email");
    theForm.Email.focus();
    return (false);
  }

   if (theForm.Email.value.indexOf(".") == -1)
  {
    alert("manca il punto nella Email");
    theForm.Email.focus();
    return (false);
  }


if (theForm.Pass.value == "") {
    alert("Compilare il campo Password");
    theForm.Pass.focus();
    return (false);
  }
  
if (document.getElementById('Pass').value.length < 6 ) {
    alert("il campo Password deve essere lungo almeno 6 caratteri");
    theForm.Pass.focus();
    return (false);
  }
  
if (theForm.RePass.value == "") {
    alert("Compilare il campo Riscrivi la password");
    theForm.RePass.focus();
    return (false);
  }

if (document.getElementById('RePass').value.length < 6) {
    alert("il campo Riscrivi Password deve essere lungo almeno 6 caratteri");
    theForm.RePass.focus();
    return (false);
  }

if (theForm.Pass.value != theForm.RePass.value) {
    alert("I campi Password e Riscrivi password non corrispondono");
    theForm.RePass.focus();
    return (false);
  } 



    if (theForm.Azienda.value == "")
  {
    alert("Compilare il campo Azienda");
    theForm.Azienda.focus();
    return (false);
  }
  
     if (/@/.test(theForm.Azienda.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Azienda");
    theForm.Azienda.focus();
    return (false);
  }



if (theForm.Indirizzo.value == "") {
    alert("Compilare il campo Indirizzo");
    theForm.Indirizzo.focus();
    return (false);
  }
  
if (theForm.Citta.value == "") {
    alert("Compilare il campo Cittā");
    theForm.Citta.focus();
    return (false);
  }

if (theForm.Cap.value == "") {
    alert("Compilare il campo Cap");
    theForm.Cap.focus();
    return (false);
  }
  
if (document.getElementById('Cap').value.length < 5 ) {
    alert("Il campo Cap č composto di 5 cifre");
    theForm.Cap.focus();
    return (false);
  }

if (isNaN(document.getElementById('Cap').value)) {
    alert("il campo Cap richiede SOLO numeri");
    theForm.Cap.focus();
    return (false);
  } 


 
    if (theForm.Telefono.value == "")
  {
    alert("Compilare il campo Telefono");
    theForm.Telefono.focus();
    return (false);
  }
  
     if (/@/.test(theForm.Telefono.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Telefono");
    theForm.Telefono.focus();
    return (false);
  }
 
    return (true);

  }
