	function enquiryForm(theForm) {
	  allCorrect=true ;
	  
	  if (theForm.elements['First Name'].value=="" || 
		  theForm.elements['Last Name'].value=="" ||
		  theForm.elements['Mobile Number'].value=="" ||
		  theForm.elements['Account Number'].value=="" ||
		  theForm.DOB.value=="" ||
		  theForm.Email.value=="" ) {
		allCorrect=false ;
	  }
	  if (allCorrect==false)
	  {
		alert("Please fill in all fields marked *") ;
		return false ;
	  } 
		return true ;
	}

	function contactForm(theForm) {
	  allCorrect=true ;
	  
	  if (theForm.FirstName.value=="" || 
		  theForm.LastName.value=="" ||
		  theForm.PrimaryContactNumber.value=="" ||
		  theForm.Email.value=="" ) {
		allCorrect=false ;
	  }
	  if (allCorrect==false)
	  {
		alert("Please fill in all fields marked *") ;
		return false ;
	  } 
		return true ;
	}
	
	/* Generic check email function*/
	function checkEmail(emailAddy) {
	  if (emailAddy.value.length==0)
	  {
		return true ;
	  }
	  if (emailAddy.value.indexOf("@",0) < 1 || emailAddy.value.indexOf(".",0) < 1)
	  {
		alert("Please check the field:\n The email address appears incorrectly formed") ;
		emailAddy.focus() ;
		return false ;
	  }
	  return true ;
	}

	/* generic phone number checker allowing brackets for prefix */
	function checkPhone(phoneField) {
	  allNumeric=true ;
	  var strValue;
	  strValue = phoneField.value;
	  if (phoneField.value.length==0)
	  {
		return true ;
	  }
	  
	  for (i=0 ; i<phoneField.value.length ; i++)  {
		checkChar=phoneField.value.charAt(i);
		if (checkChar<'0' || checkChar>'9')
		{
		 strValue = strValue.replace(checkChar,'');
		}  
	  }
	  phoneField.value = strValue;
	  
	  if (strValue.length != 10)
	  {
		alert("Please check the phone number, phone numbers must be 10 characters.");
		phoneField.value = '' ;
		phoneField.focus() ;
		return false ;
	  }
	  return true ;
	}
