function Survey_Validator(theForm)
{

//NAME VALIDATE:
  if (theForm.rname.value == "")
  //TEST FOR ENTRY
  {
    alert("Please enter a value for the \"Name (First, Last)\" field.");
    theForm.rname.focus();
    return (false);
  }

//COMPANY VALIDATE:
  if (theForm.company.value == "")
  //TEST FOR ENTRY
  {
    alert("Please enter a value for the \"Company\" field.");
    theForm.company.focus();
    return (false);
  }

//EMAILADDRESS:
  var str=theForm.email.value
  var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
    if (filter.test(str))
    testresults=true
    else{
    alert("Please input a valid email address!")
    return (false);
    }

//STRENGTHS:
  if (theForm.strength.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"Strengths\" field.");
    theForm.strength.focus();
    return (false);
  }

//challenges:
  if (theForm.challenges.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"challenges\" field.");
    theForm.challenges.focus();
    return (false);
  }

//events:
  if (theForm.events.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"events\" field.");
    theForm.events.focus();
    return (false);
  }

//issues:
  if (theForm.issues.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"issues\" field.");
    theForm.issues.focus();
    return (false);
  }

//audience:
  if (theForm.audience.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"audience\" field.");
    theForm.audience.focus();
    return (false);
  }

//day:
  if (theForm.day.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"day\" field.");
    theForm.day.focus();
    return (false);
  }

//speakers:
  if (theForm.speakers.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"speakers\" field.");
    theForm.speakers.focus();
    return (false);
  }

//helpful:
  if (theForm.helpful.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"helpful\" field.");
    theForm.helpful.focus();
    return (false);
  }

//COMMENTS:
  if (theForm.comments.value.length > 1024)
  {
    alert("Please enter at most 1024 characters in the \"Comment\" field.");
    theForm.comments.focus();
    return (false);
  }


//SCRIPT END
  return (true);
}
//-->