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.cfname.value==""){
		alert('Please provide your first name.');
		frm.cfname.focus();
		return false; }

	if(!validate_email(frm.cemail))
	{	return false;	}

	if(frm.cphone.value==""){
		alert('Please provide your phone number.');
		frm.cphone.focus();
		return false; }

	return true;
}


function checkmail()
{
	email = document.getElementById('cemail')
	if(!validate_email(email))
	{	return false;	}
	return true;
}

