function ContactForm () {
	$('form').style.display = "none";
	Loading();
	new Ajax.Request('asp/includes/feedback.asp?_r=' + Math.random(), {method: 'post', parameters: $('form').serialize(true), evalScripts: true, onSucess:Contact()});

}
function numonly(field) {
field.value=field.value.replace(/[^0-9]/g, '');
}
function Contact () {

$('alert').innerHTML = "Thank you for submitting the feedback form, we will contact you as soon as possible."
}
function Loading () {
$('alert').style.display = "block";
}

function CheckContactForm () {
var error = "";
 var i;
 
    if ($('form').fl1.value.length == 0) {
	       error = "error"
    } else {
    //	$('form').fl1.style.background = "blue";
    }
	   
	error += checkemail($('form').fl3);
	
	
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("Please correct the fields that have been marked as required.");
  return false;
}
}

function checkemail(email) {
	var error = "";
	apos=email.value.indexOf("@")
	dotpos=email.value.lastIndexOf(".")

if (email.value == "" || apos<1 || dotpos-apos<2)
{
 //email.className = "form-inp-";
 		error = "error";
} else {
 //email.className = "form-inp";
}
    return error;  
}


