function FormValidator(theForm)
{
  
  if (theForm.ORGANIZATIONNAME.value == "")
  {
    alert("Please enter a value for the \"Organization Name\" field.");
    theForm.ORGANIZATIONNAME.focus();
    return (false);
  }
  if (theForm.ADDRESS.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.ADDRESS.focus();
    return (false);
  }
  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.city.focus();
    return (false);
  }
  if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.state.focus();
    return (false);
  }
  
  if (theForm.ZIPCODE.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.ZIPCODE.focus();
    return (false);
  }
  if (theForm.BUSINESSCONTACT.value == "")
  {
    alert("Please enter a value for the \"Business Contact\" field.");
    theForm.BUSINESSCONTACT.focus();
    return (false);
  }
  var FmtStr="";
  var index = 0;
  var LimitCheck;
  var checkStr = theForm.phone.value;
  LimitCheck = checkStr.length;
  while (index != LimitCheck)
  {
   if (isNaN(parseInt(checkStr.charAt(index))))
    { }
   else
    { FmtStr = FmtStr + checkStr.charAt(index); }
   index = index + 1;
  }
  if (FmtStr.length != 10)
  {
    alert("Error - Phone ... U.S. phone numbers have exactly ten digits.");
    theForm.phone.focus();
    return (false);
  }
  
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.username.value == "")
  {
    alert("Please enter a value for the \"Username\" field.");
    theForm.username.focus();
    return (false);
  }
  
  if (theForm.pwd.value == "")
  {
    alert("Please enter a value for the \"Password\" field.");
    theForm.pwd.focus();
    return (false);
  }
  return (true);
}
