// JavaScript Document
function checkForm(contactForm)
{
	
	if(contactForm.name.value=="")
	{
		alert("Name field should not be blank!");
		contactForm.name.focus();
		return false;
	}
	
	if(contactForm.telephone.value=="")
	{
		alert("Telephone field should not be blank!");
		contactForm.telephone.focus();
		return false;
	}
	if(isNaN(contactForm.telephone.value)==true)
	{
		alert("Phone number must be numeric") ;
		contactForm.telephone.focus();
		contactForm.telephone.value="";
		return false;
	}
	
	if(contactForm.email.value=="")
	{
		alert("Email field should not be blank!");
		contactForm.email.focus();
		return false;
	}
	if (!contactForm.email.value.match(/^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$/))
	{
		alert("Enter a valid E-mail ID!");
		contactForm.email.focus();
		contactForm.email.value="";
		return false;
	}
	
	if(contactForm.comments.value=="")
	{
		alert("Comments field should not be blank!");
		contactForm.comments.focus();
		return false;
	}
	
	return;
}
