function submitContact() {
	
	var errors = false;
	var errorString = "<p>";
	
	if ($("#fname").val() == "") {
		$("#fname").css("background-color", "#ff0000");	
		errorString += "Please insert your First Name<br />";
		errors = true;
	} else {
		$("#fname").css("background-color", "#ffffff");	
	}
  
  if ($("#sname").val() == "") {
		$("#sname").css("background-color", "#ff0000");	
		errorString += "Please insert your Last Name<br />";
		errors = true;
	} else {
		$("#sname").css("background-color", "#ffffff");	
	}
	
  if ($("#email").val() == "") {
		$("#email").css("background-color", "#ff0000");	
		errorString += "Please insert your email address<br />";
		errors = true;
	} else {
		$("#email").css("background-color", "#ffffff");	
	}
	
  if ($("#security").val() == "") {
		$("#security").css("background-color", "#ff0000");	
		errorString += "Please insert the number from the image into the security box<br />";
		errors = true;
	} else {
		$("#security").css("background-color", "#ffffff");	
	}
			
	if (errors == true) {
		
		errorString += "<\/p>";
		$("#contactLog").html(errorString);
	
	} else {
	   
		  $.ajax({
			    url: '/tools/contact/contactSubmit.php',
			    data: "security=" + $("#security").val() + "&fname=" + $("#fname").val() + "&sname=" + $("#sname").val() + "&email=" + $("#email").val() + "&phone=" + $("#phone").val() + "&message=" + $("#message").val() + "&hear=" + $("#hear").val(),
          timeout: 5000,

			    error: function(){
			        $("#contactLog").html("<p>Error<\/p>");
			    },

			    success: function(XMLHttpRequest, textStatus) {
              
              if (XMLHttpRequest == "Captcha Failed") {
                
                $("#security").css("background-color", "#ff0000");	
                $("#contactLog").html("Captcha Wrong - Please try again");
                
              } else {
              
                $("#contactFormDiv").html("<p>Thankyou for you request, we aim to respond to all request within 2 working days. Please ensure that you 'whitelist' itsonlywater.co.uk to ensure that any emails from us are not marked as spam.<\/p>");	  
                $("#contactLog").html("");
                
              } 			  		
			    }

			});
	
	}
	
}