// JavaScript Document
function isValidEmail(email)
{	
	re=/^.+\@.+\..+$/;
	validEmail=re.exec(email);
	if (validEmail) return true;
	return false;
}




function validateContact(myForm)
{
	

	if (myForm.firstName.value=="")
	{
		alert("Please enter your first name.");
		myForm.name.focus();
		myForm.name.select();
		return false;
	}	
	
	if (myForm.lastName.value=="")
	{
		alert("Please enter your last name.");
		myForm.lastName.focus();
		myForm.lastName.select();
		return false;
	}	

	if (myForm.email.value=="")
	{
		alert("Please enter your email address.");
		myForm.email.focus();
		myForm.email.select();
		return false;
	}	

	if (!isValidEmail(myForm.email.value))
	{
		alert("The email address you entered is not valid. Please try again");
		myForm.email.focus();
		myForm.email.select();
		return false;
	}	

	
	
	if (myForm.comment.value=="")
	{
		alert("Please make a comment or ask a question.");
		myForm.comment.focus();
		myForm.comment.select();
		return false;
	}
	

	return true;
}