// JavaScript Document
<!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Name.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Name.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@<>.-";
  var checkStr = theForm.Email.value;
  var allValid = true;
  var validGroups = true;
  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 (!allValid)
  {
    alert("Please enter only letter, digit and \"@<>.-\" characters in the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Phone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    theForm.Phone.focus();
    return (false);
  }

  if (theForm.Phone.value.length < 7)
  {
    alert("Please enter at least 7 characters in the \"Phone\" field.");
    theForm.Phone.focus();
    return (false);
  }

  var checkOK = "0123456789-()-.<> \t\r\n\f";
  var checkStr = theForm.Phone.value;
  var allValid = true;
  var validGroups = true;
  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 (!allValid)
  {
    alert("Please enter only digit, whitespace and \"()-.<>\" characters in the \"Phone\" field.");
    theForm.Phone.focus();
    return (false);
  }

  if (theForm.Location_of_Reception.value == "")
  {
    alert("Please enter a value for the \"Location_of_Reception\" field.");
    theForm.Location_of_Reception.focus();
    return (false);
  }

  if (theForm.Location_of_Reception.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Location_of_Reception\" field.");
    theForm.Location_of_Reception.focus();
    return (false);
  }

  if (theForm.Number_of_Guests.value == "")
  {
    alert("Please enter a value for the \"Number_of_Guests\" field.");
    theForm.Number_of_Guests.focus();
    return (false);
  }

  if (theForm.Number_of_Guests.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Number_of_Guests\" field.");
    theForm.Number_of_Guests.focus();
    return (false);
  }

  if (theForm.Number_of_Guests.value.length > 4)
  {
    alert("Please enter at most 4 characters in the \"Number_of_Guests\" field.");
    theForm.Number_of_Guests.focus();
    return (false);
  }

  var checkOK = "0123456789-,";
  var checkStr = theForm.Number_of_Guests.value;
  var allValid = true;
  var validGroups = 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("Please enter only digit characters in the \"Number_of_Guests\" field.");
    theForm.Number_of_Guests.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseInt(allNum);
  if (chkVal != "" && !(prsVal >= "1"))
  {
    alert("Please enter a value greater than or equal to \"1\" in the \"Number_of_Guests\" field.");
    theForm.Number_of_Guests.focus();
    return (false);
  }
  return (true);
}
//-->