function submitContactForm() {
	 var sendName = document.getElementById('contactName').value;
		var sendPhone = document.getElementById('contactPhone').value;
		var sendEmail = document.getElementById('contactEmail').value;
		var sendMessage = document.getElementById('contactMessage').value;
		
		if (sendName == '') {
			 alert('You must enter your name in the contact form.');
				return false;
		} else if (sendPhone == '') {
			 alert('You must enter your phone number in the contact form.');
				return false;
		} else if (sendEmail == '') {
			 alert('You must enter your e-mail address in the contact form.');
		} else if (!isValidEmail(sendEmail)) {
			 alert('Please check the e-mail address you entered - it doesn\'t appear to be valid.');
				return false;
		} else if (sendMessage == '') {
			 if(confirm('You haven\'t entered a message in the contact form.\nIf you continue submitting the contact form, you\'ll receive a phone call from one of our friendly staff soon, however we\'ll be able to help you more if you enter a brief message explaining the reason that you\'re contacting us.\n\nDo you want to send the contact form without a message?')){
						// Send form anyway
															} else {
																 return false;
															}
		}
		jQuery("form#contact_form").slideUp("fast");
		jQuery("div#contact_progress").slideDown("fast");
		jQuery.post("/library/ajax_contact.php", { name: sendName, phone: sendPhone, email: sendEmail, message: sendMessage }, function(data) {
																																																																	jQuery("div#contact_progress").slideUp("fast");
																																																																	jQuery("div#contact_complete").html(data.message);
																																																																	jQuery("div#contact_complete").slideDown("fast");
																																																																																																																													}, "json");
				
		return false;
		
}


function isValidEmail(str) {

   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
 


}