function Validator(theForm)
{if (theForm.SName.value == "")
  {
    alert("Please enter a value for the \"Surname\" field.");
    theForm.SName.focus();
    return (false);
  }
 
  if (theForm.SName.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"SName\" field.");
    theForm.SName.focus();
    return (false);
  }

 
  if (theForm.FName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.FName.focus();
    return (false);
  }
 
  if (theForm.FName.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"FName\" field.");
    theForm.FName.focus();
    return (false);
  }

if (theForm.Emailadd.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.Emailadd.focus();
    return (false);
  }
 
  if (theForm.Emailadd.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Emailadd\" field.");
    theForm.Emailadd.focus();
    return (false);
  }

if (theForm.country.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"country\" field.");
    theForm.country.focus();
    return (false);
  }
 
 
  if (theForm.P_home.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"P_home\" field.");
    theForm.P_home.focus();
    return (false);
  }
 if (theForm.Cell_no.value == "")
  {
    alert("Please enter a value for the \"Cell\" field.");
    theForm.Cell_no.focus();
    return (false);
  }
 
  if (theForm.Cell_no.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Cell_no\" field.");
    theForm.Cell_no.focus();
    return (false);
  }
 if (theForm.P_code.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"P_code\" field.");
    theForm.P_code.focus();
    return (false);
  }
 
if (theForm.No_Ad.value == "")
  {
    alert("Please enter a value for the \"Adults\" field.");
    theForm.No_Ad.focus();
    return (false);
  }
 
  if (theForm.No_Ad.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"No_Ad\" field.");
    theForm.No_Ad.focus();
    return (false);
  }
 
  if (theForm.No_Ch.value == "")
  {
    alert("Please enter a value for the \"Children\" field.");
    theForm.No_Ch.focus();
    return (false);
  }
 
  if (theForm.No_Ch.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"No_Ch\" field.");
    theForm.No_Ch.focus();
    return (false);
  }

 
  if (theForm.enq_text.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Comments\" field.");
    theForm.enq_text.focus();
    return (false);
  }
 
  
 
  if (theForm.Sspam.value == "")
  {
    alert("Please enter a value for the \"Stop Spam\" field.");
    theForm.Sspam.focus();
    return (false);
  }
 
  if (theForm.Sspam.value.length > 5)
  {
    alert("Please enter at most 5 characters in the \"Sspam\" field.");
    theForm.Sspam.focus();
    return (false);
  }
 
  var chkVal = theForm.Sspam.value;
  var prsVal = chkVal;
  if (chkVal != "" && !(prsVal == "21476"))
  {
    alert("Please enter a value equal to \"21476\" in the \"Sspam\" field.");
    theForm.Sspam.focus();
    return (false);
  }
  return (true);
}

