/* 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 ;
}
/* 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(contact) {
  allCorrect=true ;
  
  if (contact.Name.value=="" || 
      contact.Company.value=="" ||
	  contact.Address.value=="" ||
	  contact.Suburb.value=="" ||
	  contact.Postcode.value=="" ||
	  contact.Phone.value=="" ||
	  contact.Facsimile.value=="" ||
	  contact.Enquiry.value=="" ||
	  contact.Email.value=="" ) {
    allCorrect=false ;
  }
  if (allCorrect==false)
  {
    alert("Please fill in all fields marked *") ;
	return false ;
  } 
    return true ;
}
