function RegisterForm_Validator(theForm)
{

  if (theForm.strPassword.value == "")
  {
    alert("Please enter a value for the \"Position\" field.");
    theForm.strPassword.focus();
    return (false);
  }
  
  if (theForm.strFirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.strFirstName.focus();
    return (false);
  }
  
  if (theForm.strLastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.strLastName.focus();
    return (false);
  }

  if (theForm.strSS.value == "")
  {
    alert("Please enter a value for the \"Social Security Number\" field.");
    theForm.strSS.focus();
    return (false);
  }
  
  
if (theForm.strEmail.value != "")
  {   
	  strError = validateEmail(theForm.strEmail.value)
	  if (strError != "") {
			alert(strError);
	    	theForm.strEmail.focus();
	    	return (false);
	  }
  }
	  
 
    
  if (theForm.strStreet.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.strStreet.focus();
    return (false);
  }
  
 if (theForm.strCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.strCity.focus();
    return (false);
  }
  
  if (theForm.lngStateID){
	  if (theForm.lngStateID.value == "0")
	  {
	    alert("Please select a \"State/Province.\"");
	    theForm.lngStateID.focus();
	    return (false);
	  }
  }
  
  if (theForm.strZIP.value == "")
  {
    alert("Please enter a value for the \"Postal Code\" field.");
    theForm.strZIP.focus();
    return (false);
  }
 
  if ((theForm.strPhoneArea.value == "" && theForm.strPhone.value == "")) {
  	alert("Please enter a value for the \"Phone\" field.");
    theForm.strPhone.focus();
   	return (false);
  }
  
  
  
  if (!(theForm.ckAgree.checked))
  {
    alert("To submit the form, please check \"Yes\" to agree with the authorization statement.");
    theForm.ckAgree.focus();
    return (false);
  }

  
   return (true);  
}
