
function checkform (myForm) {

	if ($("#fn").val()==""){
		alert ("You must enter a first name");
		return false;
	}

	if ($("#ln").val()==""){
		alert ("You must enter a last name");
		return false;
	}

	if (checkemail($("#em").val())==false){
		alert ("You must enter a valid email address");
		return false;
	}	

	if ($("#ph").val()==""){
		alert ("You must enter a phone number");
		return false;
	}

	return true;

}


function checkemail(str){
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str))
		testresults=true
	else{
		testresults=false
	}
	return (testresults)
}

	
