<!--
function Form_Validator(theForm) {
  if (theForm.cSal.value == 'Other >>>' && theForm.cSalOth.value == '') {
    alert('You have select "Other" as your Salutation however you have not provided more information as requested.');
    theForm.cSalOth.focus();
    return (false);
  }
  if (theForm.cSal.value != 'Other >>>' && theForm.cSalOth.value != '') {
    alert('You have entered a Salutation in the text box however you have not selected ""Other >>>"".');
    theForm.cSal.focus();
    return (false);
  }
  if (theForm.cFna.value == '') {
    alert('Please provide your First Name.');
    theForm.cFna.focus();
    return (false);
  }
  if (theForm.cLna.value == '') {
    alert('Please provide your Last Name.');
    theForm.cLna.focus();
    return (false);
  }
  if (theForm.cAdd1.value == '') {
    alert('Please enter your Address.');
    theForm.cAdd1.focus();
    return (false);
  }
  if (theForm.cAdd1.value.length < 10) {
    alert('Please enter a valid Address.');
    theForm.cAdd1.focus();
    return (false);
  }
  if (theForm.cSub.value == '') {
    alert('Please enter your Suburb City.');
    theForm.cSub.focus();
    return (false);
  }
  if (theForm.cSta.value == 'OTH' && theForm.cStaOth.value == '') {
    alert('You have selected "Other" as your State however you have not provided more information as requested.');
    theForm.cStaOth.focus();
    return (false);
  }
  if (theForm.cPos.value == '') {
    alert('Please enter your Postal Code.');
    theForm.cPos.focus();
    return (false);
  }
  var checkTLD=1;
  var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
  var emailPat=/^(.+)@(.+)$/;
  var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
  var validChars="\[^\\s" + specialChars + "\]";
  var quotedUser="(\"[^\"]*\")";
  var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
  var atom=validChars + '+';
  var word="(" + atom + "|" + quotedUser + ")";
  var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
  var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
  var matchArray=theForm.cEma.value.match(emailPat);
  if (matchArray==null) {
    alert("Your Email Address seems incorrect (check @ and .'s)");
    theForm.cEma.focus();
    return false;
  }
  var user=matchArray[1];
  var domain=matchArray[2];
  for (i=0; i<user.length; i++) {
    if (user.charCodeAt(i)>127) {
      alert("The Username portion of your Email Address contains invalid characters.");
      theForm.cEma.focus();
      return false;
    }
  }
  for (i=0; i<domain.length; i++) {
    if (domain.charCodeAt(i)>127) {
      alert("The Domain portion of your Email Address contains invalid characters.");
      theForm.cEma.focus();
      return false;
    }
  }
  if (user.match(userPat)==null) {
    alert("The Username portion of your Email Address does not appear to be valid.");
    theForm.cEma.focus();
    return false;
  }
  var IPArray=domain.match(ipDomainPat);
  if (IPArray!=null) {
    for (var i=1;i<=4;i++) {
      if (IPArray[i]>255) {
        alert("Destination IP address of your Email Address is invalid.");
        theForm.cEma.focus();
        return false;
      }
    }
    return true;
  }
  var atomPat=new RegExp("^" + atom + "$");
  var domArr=domain.split(".");
  var len=domArr.length;
  for (i=0;i<len;i++) {
    if (domArr[i].search(atomPat)==-1) {
      alert("The Domain portion of your Email Address does not appear to be valid.");
      theForm.cEma.focus();
      return false;
    }
  }
  if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) {
    alert("Your Email Address must end in a well-known domain or two letter " + "country.");
    theForm.cEma.focus();
    return false;
  }
  if (len<2) {
    alert("Your Email Address is missing the host name.");
    theForm.cEma.focus();
    return false;
  }
  if (theForm.cTel.value == '') {
    alert('Please enter your Telephone Number.');
    theForm.cTel.focus();
    return (false);
  }
  if (theForm.cTel.value.length < 6) {
    alert('Please enter a valid Telephone Number.');
    theForm.cTel.focus();
    return (false);
  }
  if (theForm.pDea.value.length < 6) {
    alert('Please enter the name of Dealer that you purchased your Nifty Antenna from.');
    theForm.pDea.focus();
    return (false);
  }
  if (theForm.pTel.value.length < 6) {
    alert('Please enter the Telephone Number of the Dealer.');
    theForm.pTel.focus();
    return (false);
  }
  if (theForm.pDateDD.value.length == '') {
    alert('Please enter a valid Date.');
    theForm.pDateDD.focus();
    return (false);
  }
  if (theForm.pDateYY.value.length == '') {
    alert('Please enter a valid Date.');
    theForm.pDateYY.focus();
    return (false);
  }
  return (true);
}
//-->
