function goFormProcess () {
	$('contactForm').style.display = 'none';
	$('contactFormReplace').style.display = 'block';
	new Ajax.Request('code/includes/feedback.asp?_r=' + Math.random(), {method: 'post', parameters: $('contactForm').serialize(true), evalScripts: true, onSucess:Contact()});



}
  
function Contact () {
	$('contactFormReplace').innerHTML = "Thank you for completing our enquiry form, we will be in contact with you shortly.";

}

function numonly(field) {
field.value=field.value.replace(/[^0-9]/g, '');
}

function goForm  () {
var error = "";
 var i;
 	if ($('contactForm').enquiry.value.length == 0) {
		$('contactForm').enquiry.focus();
       error = "error"
    } 
  	
	error += checkemail($('contactForm').email);

	if ($('contactForm').tel.value.length == 0) {

		$('contactForm').tel.focus();
       error = "error"
    } 

   	if ($('contactForm').company.value.length == 0) {

		$('contactForm').company.focus();
       error = "error"
    } 
	  if ($('contactForm').name.value.length == 0) {

		$('contactForm').name.focus();
       error = "error"
    } 
if (error != "") {
  // alert("Some of the fields were not completed correctly, please correct them and try again. There are problems with the following fields: "+wg.slice(0, -2)+".");
  alert("You have either made an invalid input or not filled in the entire enquiry form, please do so and try again.");
  return false;
} else {
goFormProcess ();
}

}

function checkemail(email) {
	var error = "";
	apos=email.value.indexOf("@")
	dotpos=email.value.lastIndexOf(".")

if (email.value == "" || apos<1 || dotpos-apos<2)
{
		$('contactForm').email.focus();
 		error = "error";
}
    return error;  
}

