function validate_email(strng)
{
	var emailFilter=/^.+@.+\..{2,3}$/;
	var strEmail=strng.value;

	if (!(emailFilter.test(strEmail))) {
		alert("Please enter a valid email address.");
		strng.focus();
		strng.select();
		return false;
	}
	return true;
}

function checkcontact(frm)
{
	if(frm.cname.value==""){
		alert('Please enter your name');
		frm.cname.focus();
		return false; }

	if(frm.cphone.value==""){
		alert('Please enter your phone number');
		frm.cphone.focus();
		return false; }

	if(!validate_email(frm.cemail))
	{	return false;	}

	return true;
}


function checkmail(frm)
{
	if(!validate_email(frm.email))
	{	return false;	}
	return true;
}

