/**
 * @author neil.grimes
 */
function checkContactForm() {
	
	var emailRegex = /^.+\@.+\..+$/;
	var missinginfo = "";
	
	if (document.contactForm.name.value == "") {
	    missinginfo += "\n     -  Please provide your Name";
	}
	
	if (document.contactForm.email.value == "") {
        missinginfo += "\n     -  Please provide your Email Address";
    } else {
        if (!emailRegex.test(document.contactForm.email.value)) {
            missinginfo += "\n     -  Your Email Address is not of the correct format";
            missinginfo += "\n           e.g.    example@example.com";
        }
	}
	
	if (document.contactForm.enquiry.value == "") {
        missinginfo += "\n     -  Please provide details of your Enquiry";
    }
	
	if (missinginfo != "") {
	    missinginfo ="The following errors exist on the form :\n" +
	    missinginfo + "\n" +
	    "\nPlease re-enter and submit again.";
	    
	    alert(missinginfo);
	    return false;
	}
	    else return true;
}
