function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Nome.value == "")
  {
    alert("Inserire un valore per il campo \"Nome\".");
    theForm.Nome.focus();
    return (false);
  }

  if (theForm.Nome.value.length < 3)
  {
    alert("Inserire almeno 3 caratteri nel campo \"Nome\".");
    theForm.Nome.focus();
    return (false);
  }

  if (theForm.Cognome.value == "")
  {
    alert("Inserire un valore per il campo \"Cognome\".");
    theForm.Cognome.focus();
    return (false);
  }

  if (theForm.Cognome.value.length < 3)
  {
    alert("Inserire almeno 3 caratteri nel campo \"Cognome\".");
    theForm.Cognome.focus();
    return (false);
  }

  if (theForm.Indirizzo.value == "")
  {
    alert("Inserire un valore per il campo \"Indirizzo\".");
    theForm.Indirizzo.focus();
    return (false);
  }

  if (theForm.Indirizzo.value.length < 5)
  {
    alert("Inserire almeno 5 caratteri nel campo \"Indirizzo\".");
    theForm.Indirizzo.focus();
    return (false);
  }

  if (theForm.Citta.value == "")
  {
    alert("Inserire un valore per il campo \"Citta\".");
    theForm.Citta.focus();
    return (false);
  }

  if (theForm.Citta.value.length < 3)
  {
    alert("Inserire almeno 3 caratteri nel campo \"Citta\".");
    theForm.Citta.focus();
    return (false);
  }

  if (theForm.Stato.selectedIndex < 0)
  {
    alert("Selezionare una delle opzioni di \"Stato\".");
    theForm.Stato.focus();
    return (false);
  }

  if (theForm.Stato.selectedIndex == 0)
  {
    alert("La prima opzione di \"Stato\" non è una selezione valida. Scegliere un'altra opzione.");
    theForm.Stato.focus();
    return (false);
  }

  if (theForm.Email.value == "")
  {
    alert("Inserire un valore per il campo \"Email\".");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length < 5)
  {
    alert("Inserire almeno 5 caratteri nel campo \"Email\".");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Telefono.value == "")
  {
    alert("Inserire un valore per il campo \"Telefono\".");
    theForm.Telefono.focus();
    return (false);
  }

  if (theForm.Persone.value == "")
  {
    alert("Inserire un valore per il campo \"Persone\".");
    theForm.Persone.focus();
    return (false);
  }

  if (theForm.Persone.value.length < 1)
  {
    alert("Inserire almeno 1 caratteri nel campo \"Persone\".");
    theForm.Persone.focus();
    return (false);
  }

  var checkOK = "0123456789-.";
  var checkStr = theForm.Persone.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch != ".")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Inserire solo cifra caratteri nel campo \"Persone\".");
    theForm.Persone.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseInt(allNum);
  if (chkVal != "" && !(prsVal >= "1"))
  {
    alert("Inserire un valore maggiore o uguale a \"1\" nel campo \"Persone\".");
    theForm.Persone.focus();
    return (false);
  }

  if (theForm.Sistemazione.selectedIndex < 0)
  {
    alert("Selezionare una delle opzioni di \"Sistemazione\".");
    theForm.Sistemazione.focus();
    return (false);
  }
  return (true);
}