// Javascript which is used for validating:

 function foc()
 	{
	document.forms[0].name.focus();
	}
 function init()
  {
    document.forms[0].name.value=="";
	document.forms[0].name.focus();
  }	
function validation()
  {
    if(document.forms[0].name.value=="")
	 	{
	   		alert("Please enter your Name");
	   		document.forms[0].name.focus();
	   		return false;
	 	}

	if(document.forms[0].cname.value=="")
	 	{
	   		alert("Please enter your Company Name");
	   		document.forms[0].cname.focus();
	   	   	return false;
	 	}
   var cm=document.forms[0].email.value;
	   	var len=cm.length;
	  	var atpos=cm.indexOf("@");   
	  	var dott =cm.indexOf(".");
	  	var dotpos=dott+1;
	  	var dif=(dott-atpos)
	  	
	if ((cm=="")||(len==dotpos)||(atpos==0)||(dif<2))
         	{ 
				alert("Invalid Email Id");
			    document.forms[0].email.value="";
				document.forms[0].email.focus();
				document.forms[0].email.select();
	    		return (false);
	   		}
		 
	   
}	 


