// JavaScript Document
function checkForm(){
	var doc = document.enquiry
	var Email = doc.Email
	var emailFormat  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (doc.Name.value == ""){
		alert("Sorry, you will need to fill in your name !")
		doc.Name.focus()
		return false;
	}

	if (!emailFormat.test(Email.value)){
		alert('Sorry, your email address is not correct !');
		doc.Email.focus();																											
		return false;
	}

	if (doc.Enquiry.value == ""){
		alert("Sorry, you will need to fill in the enquiry box !")
		doc.Enquiry.focus()
		return false;
	}
}

function submitForm(){
	var doc = document.enquiry
	var Email = doc.Email
	var emailFormat  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (doc.Name.value == ""){
		alert("Sorry, you will need to fill in your name !")
		doc.Name.focus()
		return false;
	}

	if (!emailFormat.test(Email.value)){
		alert('Sorry, your email address is not correct !');
		doc.Email.focus();																											
		return false;
	}
	
	if (!document.getElementById('terms').checked){
		alert("Sorry, you will need to agree with our Terms & Conditions !")
		
		return false;
	}
}

function checkProductForm(){
	var doc = document.forms[1]
	var Email = doc.email
	var emailFormat  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (doc.name.value == ""){
		alert("Sorry, you will need to fill in your name !")
		doc.name.focus()
		return false;
	}

	if (!emailFormat.test(Email.value)){
		alert('Sorry, your email address is not correct !');
		doc.email.focus();																											
		return false;
	}
}
