function checkForm(theForm){
var theName = theForm.Name;
var theCompany = theForm.Company;
var theEmail = theForm.email;
var theCategory = theForm.Category;
var str=theEmail.value;
var testresults;
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

	if ((theName.value == "" || theName.value == "Please enter your full name")){
		alert('Please enter your full name in the designated box');
		theName.style.background="#fff";
		theCompany.style.background="#fff";
		theEmail.style.background="#fff";
		theName.focus();
		theName.style.background="#ebebeb";
		return false;
	}//end if
	
	if ((theCompany.value == "" || theCompany.value == "Please enter your company name")){
		alert('Please enter your company name in the designated box - enter n/a if non applicable');
		theName.style.background="#fff";
		theCompany.style.background="#fff";
		theEmail.style.background="#fff";
		theCompany.focus();
		theCompany.style.background="#ebebeb";
		return false;
	}//end if
	
	if (theEmail.value == "" || theEmail.value == "Please enter your email address"){
		alert('Please enter your email address in the designated box');
		theEmail.focus();
		theName.style.background="#fff";
		theCompany.style.background="#fff";
		theEmail.style.background="#fff";
		theEmail.style.background="#ebebeb";
		return false;
	}//end if
	
	//Advanced Email Check credit-
	//By JavaScript Kit (http://www.javascriptkit.com)
	//Over 200+ free scripts here!
	
	if (filter.test(str)){
		return true
	}//end if
		else{
		window.alert("Please enter a valid email address in the designated box");
		theEmail.focus();
		theName.style.background="#fff";
		theCompany.style.background="#fff";
		theEmail.style.background="#fff";
		theEmail.style.background="#ebebeb";
		return false;
	}//end else


}//end function