function validate_form(theForm)
{


  if (theForm.EstablishmentType.value == "")
  {
    alert("Please enter the establishment type.");
    theForm.EstablishmentType.focus();
    return (false);
  }
  if (theForm.Grading.value == "")
  {
    alert("Please enter the grading.");
    theForm.Grading.focus();
    return (false);
  }
  if (theForm.VillaName.value == "")
  {
    alert("Please enter the villa name.");
    theForm.VillaName.focus();
    return (false);
  }
  if (theForm.VillaLocation.value == "")
  {
    alert("Please enter the villa location.");
    theForm.VillaLocation.focus();
    return (false);
  }
  if (theForm.VillaDescription.value == "")
  {
    alert("Please enter the villa description.");
    theForm.VillaDescription.focus();
    return (false);
  }
    if (theForm.Bedrooms.value == "")
  {
    alert("Please enter the bedroom information.");
    theForm.Bedrooms.focus();
    return (false);
  }
    if (theForm.NoOfGuests.value == "")
  {
    alert("Please enter the number of guests.");
    theForm.NoOfGuests.focus();
    return (false);
  }
    if (theForm.Staff.value == "")
  {
    alert("Please enter the staff (enter \"none\" for none).");
    theForm.Staff.focus();
    return (false);
  }
    if (theForm.Pool.value == "")
  {
    alert("Please enter the pool information(enter \"none\" for none).");
    theForm.Pool.focus();
    return (false);
  }
    if (theForm.Features.value == "")
  {
    alert("Please enter the features (enter \"none\" for none).");
    theForm.Features.focus();
    return (false);
  }
    if (theForm.LeisureAmenities.value == "")
  {
    alert("Please enter the leisure amenities(enter \"none\" for none).");
    theForm.LeisureAmenities.focus();
    return (false);
  }
    if (theForm.TermsAndConditions.value == "")
  {
    alert("Please enter the terms and conditions (enter \"none\" for none).");
    theForm.TermsAndConditions.focus();
    return (false);
  }
    if (theForm.CancelationPolicy.value == "")
  {
    alert("Please enter the cancelation policy (enter \"none\" for none).");
    theForm.CancelationPolicy.focus();
    return (false);
  }
    if (theForm.LowSeason.value == "")
  {
    alert("Please enter the low season rates.");
    theForm.LowSeason.focus();
    return (false);
  }
 var checkOK = "0123456789";
  var checkStr = theForm.LowSeason.value;
  var allValid = 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 characters in the \"low season rates\" field.\nFor example 2500 for R2500.00");
    theForm.LowSeason.focus();
    return (false);
  }
    if (theForm.MidSeason.value == "")
  {
    alert("Please enter the mid season rates.");
    theForm.MidSeason.focus();
    return (false);
  }
 var checkOK = "0123456789";
  var checkStr = theForm.MidSeason.value;
  var allValid = 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 characters in the \"mid season rates\" field.\nFor example 2500 for R2500.00");
    theForm.MidSeason.focus();
    return (false);
  }
      if (theForm.PeakSeason.value == "")
  {
    alert("Please enter the peak season rates.");
    theForm.PeakSeason.focus();
    return (false);
  }
 var checkOK = "0123456789";
  var checkStr = theForm.PeakSeason.value;
  var allValid = 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 characters in the \"Peak season rates\" field.\nFor example 2500 for R2500.00");
    theForm.PeakSeason.focus();
    return (false);
  }
      if (theForm.HighSeason.value == "")
  {
    alert("Please enter the high season rates.");
    theForm.HighSeason.focus();
    return (false);
  }
 var checkOK = "0123456789";
  var checkStr = theForm.HighSeason.value;
  var allValid = 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 characters in the \"high season rates\" field.\nFor example 2500 for R2500.00");
    theForm.HighSeason.focus();
    return (false);
  }






  if (theForm.FullName.value == "")
  {
    alert("Please enter your full name.");
    theForm.FullName.focus();
    return (false);
  }


  if (theForm.Email.value == "")
  {
    alert("Please enter your email address");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length < 6)
  {
    alert("The email address you entered is invalid");
    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.ConfirmEmail.value == "")
  {
    alert("Please confirm your email address");
    theForm.ConfirmEmail.focus();
    return (false);
  }

  if (theForm.ConfirmEmail.value.length < 6)
  {
    alert("The confirmation email address you entered is invalid");
    theForm.ConfirmEmail.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-.";
  var checkStr = theForm.ConfirmEmail.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 confirm Email field.");
    theForm.ConfirmEmail.focus();
    return (false);
  }
    if (theForm.PhoneCode.value == "")
  {
    alert("Please enter your phone code.");
    theForm.PhoneCode.focus();
    return (false);
  }
  if (theForm.PhoneNumber.value == "")
  {
    alert("Please enter your phone number.");
    theForm.PhoneNumber.focus();
    return (false);
  }


  if (theForm.SpamCheck.value == "")
  {
    alert("Please enter the red number.");
    theForm.SpamCheck.focus();
    return (false);
  }
  
  
  
  
  
  
  
  
  return (true);
}
