function formValidatorContact()
{

  // check to see if the field is blank
  if (document.contact.name_from.value == "")
  {
    alert("Please enter your name.");
    document.contact.name_from.focus();
    return (false);
  }

 // test if valid email address, must have @ and .
  var checkEmail = "@.";
  var checkStr = document.contact.email_from.value;
  var EmailValid = false;
  var EmailAt = false;
  var EmailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkEmail.length;  j++)
    {
      if (ch == checkEmail.charAt(j) && ch == "@")
        EmailAt = true;
      if (ch == checkEmail.charAt(j) && ch == ".")
        EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
    if (EmailAt && EmailPeriod)
    {
		EmailValid = true
		break;
	}
  }
  if (!EmailValid)
  {
    alert("Please enter a valid email address.");
    document.contact.email_from.focus();
    return (false);
  }

  // check to see if the field is blank
  if (document.contact.Message.value == "")
  {
    alert("Please enter a message.");
    document.contact.Message.focus();
    return (false);
  }

}

function formValidatorReserve()
{

  // check to see if the field is blank
  if (document.reservations.name_from.value == "")
  {
    alert("Please enter your name.");
    document.reservations.name_from.focus();
    return (false);
  }

 // test if valid email address, must have @ and .
  var checkEmail = "@.";
  var checkStr = document.reservations.email_from.value;
  var EmailValid = false;
  var EmailAt = false;
  var EmailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkEmail.length;  j++)
    {
      if (ch == checkEmail.charAt(j) && ch == "@")
        EmailAt = true;
      if (ch == checkEmail.charAt(j) && ch == ".")
        EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
    if (EmailAt && EmailPeriod)
    {
		EmailValid = true
		break;
	}
  }
  if (!EmailValid)
  {
    alert("Please enter a valid email address.");
    document.reservations.email_from.focus();
    return (false);
  }

  // check to see if the field is blank
  if (document.reservations.Phone.value == "")
  {
    alert("Please enter your phone number.");
    document.reservations.Phone.focus();
    return (false);
  }

  // check to see if the field is blank
  if (document.reservations.Address.value == "")
  {
    alert("Please enter your address.");
    document.reservations.Address.focus();
    return (false);
  }

  // check to see if the field is blank
  if (document.reservations.City.value == "")
  {
    alert("Please enter your city.");
    document.reservations.City.focus();
    return (false);
  }

  // check to see if the field is blank
  if (document.reservations.StateProvince.value == "")
  {
    alert("Please enter your state or province.");
    document.reservations.StateProvince.focus();
    return (false);
  }

  // check to see if the field is blank
  if (document.reservations.ZipPostal.value == "")
  {
    alert("Please enter your zip code or postal code.");
    document.reservations.ZipPostal.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.Country.value == "")
  {
    alert("Please enter your country.");
    document.reservations.Country.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.ArrivalDay.value == "")
  {
    alert("Please enter your day of arrival.");
    document.reservations.ArrivalDay.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.ArrivalMonth.value == "")
  {
    alert("Please enter your month of arrival.");
    document.reservations.ArrivalMonth.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.ArrivalYear.value == "")
  {
    alert("Please enter the year of arrival.");
    document.reservations.ArrivalYear.focus();
    return (false);
  }
    // check to see if the field is blank
  if ((document.reservations.ArrivalDay.value.length != 2) || (document.reservations.ArrivalMonth.value.length != 2) || (document.reservations.ArrivalYear.value.length != 4))
  {
    alert("The arrival date must be in dd/mm/yyyy format.");
    document.reservations.ArrivalYear.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.Nights.value == "")
  {
    alert("Please enter how many nights you are staying.");
    document.reservations.Nights.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.Persons.value == "")
  {
    alert("Please enter how many persons are staying.");
    document.reservations.Persons.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.locations.value == "")
  {
    alert("Please select a location.");
    document.reservations.locations.focus();
    return (false);
  }
  
  // check to see if the field is blank
  if (document.reservations.type.value == "")
  {
    alert("Please select a room type.");
    document.reservations.type.focus();
    return (false);
  }

}