/* Special purpose routine to check the fields that are supposed to be filled have been filled
   or else return back to the form. */
function contactForm(theForm) {
  allCorrect=true ;
  
  if (theForm.FirstName.value=="" || 
      theForm.LastName.value=="" ||
	  theForm.Phone.value=="" ||
	  theForm.Email.value=="" ) {
    allCorrect=false ;
  }
  if (allCorrect==false)
  {
    alert("Please fill in all fields marked *") ;
	return false ;
  } 
    return true ;
}

/* Check that fields have values. */
function tblmemberForm(theForm) {
  allCorrect=true ;
  
  if (theForm.strMemberEmail1.value=="" || 
      theForm.strMemberEmail2.value=="" ||
	  theForm.strMemberPassword1.value=="" ||
      theForm.strMemberPassword2.value=="" ||
	  theForm.strMemberFirstName.value=="" ||
      theForm.strMemberLastName.value=="" ||
      theForm.strMemberAddress.value=="" ||
      theForm.strMemberCity.value=="" ||
      theForm.strMemberPostcode.value=="" ||
      theForm.strMemberState.value=="" ||
	  theForm.strMemberTelephone.value=="" ) {
    allCorrect=false ;
  }
  if (allCorrect==false)
  {
    alert("Please fill in all fields marked *") ;
	return false ;
  } 
if (theForm.strMemberEmail1.value != theForm.strMemberEmail2.value)
  {
    alert("Entered email addresses are not the same")
	theForm.strMemberEmail2.focus()
	theForm.strMemberEmail2.select()
	return false 
  } 
if (theForm.strMemberPassword1.value != theForm.strMemberPassword2.value)
  {
    alert("Entered passwords are not the same")
	theForm.strMemberPassword1.focus()
	theForm.strMemberPassword1.select()
	return false 
  } 
    return true ;
}
