function Validator(theForm)
{
  if (theForm.Name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.Address.focus();
    return (false);
  }

  if (theForm.TownCity.value == "")
  {
    alert("Please enter a value for the \"Town\" field.");
    theForm.TownCity.focus();
    return (false);
  }

  if (theForm.County.selectedIndex < 0)
  {
    alert("Please select one of the \"County\" options.");
    theForm.County.focus();
    return (false);
  }

  if (theForm.Telephone.value == "")
  {
    alert("Please enter a value for the \"Telephone\" field.");
    theForm.Telephone.focus();
    return (false);
  }

  if (theForm.AdvertTradePrivate.selectedIndex < 0)
  {
    alert("Please select one of the \"Trade or Private advert \" options.");
    theForm.AdvertTradePrivate.focus();
    return (false);
  }

  if (theForm.AdvertSalePrice.value == "")
  {
    alert("Please enter a value for the \"Your sale price\" field.");
    theForm.AdvertSalePrice.focus();
    return (false);
  }

  if (theForm.AdvertHeading.value == "")
  {
    alert("Please enter a value for the \"Your advert heading\" field.");
    theForm.AdvertHeading.focus();
    return (false);
  }

  if (theForm.AdvertLocation.value == "")
  {
    alert("Please enter a value for the \"Your advert location\" field.");
    theForm.AdvertLocation.focus();
    return (false);
  }

  if (theForm.AdvertConMethod.value == "")
  {
    alert("Please enter a value for the \"Your advert contact method\" field.");
    theForm.AdvertConMethod.focus();
    return (false);
  }

  if (theForm.AdvertDescription.value == "")
  {
    alert("Please enter a value for the \"Your advert desciption\" field.");
    theForm.AdvertDescription.focus();
    return (false);
  }

  if (theForm.AdvertDescription.value.length > 300)
  {
    alert("Please enter at most 254 characters in the \"Your advert desciption\" field.");
    theForm.AdvertDescription.focus();
    return (false);
  }
  return (true);
}