
function valForm(theForm)
{
	
  if(document.theForm.name.value == "")
		{
			alert("Please enter the First Name")
			document.theForm.name.focus();
			return false;
		}
				




var email1 = document.theForm.email.value;

if (document.theForm.email.value == "")
		{
			alert ("Enter Your EMail");
			document.theForm.email.focus();
			return false;
		}
		
		  if(email1 != "")
		  {
			if (email1.length < 1 || email1.length > 50)
			{
				alert ("E-mail should be between 1 to 50 number of digits. ");
				document.theForm.email.focus(); 
				return false;
			}
			if (email1.indexOf('@',0)  == -1 || email1.indexOf('.',0)  == -1  )
			{
				alert ("E-mail should contain \'@\' and \'.\' characters. ");
				document.theForm.email.focus();  return false;
			}
			for(i=0; i<email1.length; i++)
			{
				ch = email1.substring(i,i+1);
				if((ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z') && (ch < '0' || ch > '9') && (ch !='_') && (ch !='-') && (ch !='@') && (ch  != '.'))
				{
					alert ("E-mail could be Alphanumeric only with \'@\', \'.\',hyphen and underscore characters. ");
					document.theForm.email.focus();  return false;
				}
			}
		  }
		
		if((email1).search(/^[0-9a-z]+(([\.\-_])[0-9a-z]+)*@[0-9a-z]+(([\.\-])[0-9a-z-]+)*\.[a-z]{2,4}$/i))
		{
			alert ("E-mail should contain domain name (like .com,.co.in)");
			document.theForm.email.focus();
			return false;
		}		




	return true;
}








// JavaScript Document// JavaScript Document