	//=========================================================================
	// This function performs validity checks on the feedback form and displays 
	// an informative message to the user if any errors occurred.
	// If no error has occured an email is sent and the thank you page will be displayed.
	//=========================================================================
	function frmFeedback_onSubmit() {
	var bReturnValue = false;
		
  //Perform validity checks on the second half of the form.
  
  //Check if the user entered his full name.
  if (IsEmpty(document.getElementById('txtName').value).ReturnCode > 0) {
    alert('Please enter your name');
    document.getElementById('txtName').focus();
    return bReturnValue;
  }
  
  //Check if the user entered a valid phone number. 
  hReturnInfo = IsValidPhoneNumber(document.getElementById('txtPhone').value, false); 
  if (hReturnInfo.ReturnCode > 0) {
    alert(hReturnInfo.ErrorDescription);
    document.getElementById('txtPhone').focus();
    return bReturnValue;
  }

  //Format the phone number properly.
  document.getElementById('txtPhone').value = FormatPhoneNumber(document.getElementById('txtPhone').value);
        
  //Check if the user entered a valid e-mail address. 
  hReturnInfo = IsValidEMailAddress(document.getElementById('txtEmail').value, false); 
  if (hReturnInfo.ReturnCode > 0) {
    alert(hReturnInfo.ErrorDescription);
    document.getElementById('txtEmail').focus();
    return bReturnValue;
  }
  
  //Check if the user entered his mailing address.
  if (IsEmpty(document.getElementById('txtAddress1').value).ReturnCode > 0) {
    alert('Please enter your address');
    document.getElementById('txtAddress1').focus();
    return bReturnValue;
  }
  
  //Check if the user entered his mailing city.
  if (IsEmpty(document.getElementById('txtCity').value).ReturnCode > 0) {
    alert('Please enter your mailing city');
    document.getElementById('txtCity').focus();
    return bReturnValue;
  }
  
  //Check if the user selected a state for his address.
  if (document.getElementById('selMailingState').selectedIndex == 0){
    alert('Please enter your mailing state');
    document.getElementById('selMailingState').focus();
    return bReturnValue;
  }
  
  //Check if the user entered a zip for his address.
  if (IsEmpty(document.getElementById('txtZip').value).ReturnCode > 0) {
    alert('Please enter your mailing zip code');
    document.getElementById('txtZip').focus();
    return bReturnValue;
  }
  
  //if you got this far, the form is probably filled out correctly
  bReturnValue = true;
  
  return bReturnValue;
	}	
