function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Nome.value == "")
  {
    alert("Insert a value into the field \"First name\".");
    theForm.Nome.focus();
    return (false);
  }

  if (theForm.Nome.value.length < 3)
  {
    alert("Insert 3 or more characters into the field \"First name\".");
    theForm.Nome.focus();
    return (false);
  }

  if (theForm.Cognome.value == "")
  {
    alert("Insert a value into the field \"Last name\".");
    theForm.Cognome.focus();
    return (false);
  }

  if (theForm.Cognome.value.length < 3)
  {
    alert("Insert 3 or more characters into the field \"Last name\".");
    theForm.Cognome.focus();
    return (false);
  }

  if (theForm.Indirizzo.value == "")
  {
    alert("Insert a value into the field \"Address\".");
    theForm.Indirizzo.focus();
    return (false);
  }

  if (theForm.Indirizzo.value.length < 5)
  {
    alert("Insert 5 or more characters into the field \"Address\".");
    theForm.Indirizzo.focus();
    return (false);
  }

  if (theForm.Citta.value == "")
  {
    alert("Insert a value into the field \"City\".");
    theForm.Citta.focus();
    return (false);
  }

  if (theForm.Citta.value.length < 3)
  {
    alert("Insert 3 or more characters into the field \"City\".");
    theForm.Citta.focus();
    return (false);
  }

  if (theForm.Stato.selectedIndex < 0)
  {
    alert("Select one of the values of \"Country\".");
    theForm.Stato.focus();
    return (false);
  }

  if (theForm.Stato.selectedIndex == 0)
  {
    alert("The first option of  \"Country\" is not a valid value. Choose another one.");
    theForm.Stato.focus();
    return (false);
  }

  if (theForm.Email.value == "")
  {
    alert("Insert a value into the field \"Email\".");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length < 5)
  {
    alert("Insert 5 or more characters into the field \"Email\".");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Telefono.value == "")
  {
    alert("Insert a value into the field \"Telephone\".");
    theForm.Telefono.focus();
    return (false);
  }

  if (theForm.Persone.value == "")
  {
    alert("Insert a value into the field \"Number of persons\".");
    theForm.Persone.focus();
    return (false);
  }

  if (theForm.Persone.value.length < 1)
  {
    alert("Insert 1 or more characters into the field  \"Number of persons\".");
    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("Insert only numbers into the field \"Number of persons\".");
    theForm.Persone.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseInt(allNum);
  if (chkVal != "" && !(prsVal >= "1"))
  {
    alert("Insert a value equal or greather than \"1\" into the field \"Number of persons\".");
    theForm.Persone.focus();
    return (false);
  }

  if (theForm.Sistemazione.selectedIndex < 0)
  {
    alert("Select one of the values of \"Type of accomodation\".");
    theForm.Sistemazione.focus();
    return (false);
  }
  return (true);
}