 function chkEmpty()
 {
 if(document.pinfrm.name.value == "")
   	{
     alert("Please enter your name.");
     document.pinfrm.yourname.focus(); 
     return false;
   	}

 	if(document.pinfrm.email.value =="")
    	{
		 alert("Please enter your Email Address");
		 document.pinfrm.email.focus();
		 return false;
    	}
		
    var email1,atemail,atoccurance,splitter,str;
        email1 = document.pinfrm.email.value ;
        atemail=email1.indexOf("@");
		
  if (atemail==-1)
   {
      alert("Please check your Email Address");
      document.pinfrm.email.focus();
      return false;
    }else{
           atoccurence=email1.indexOf("@");
           dotcheck=email1.indexOf(".",atoccurence);
           if (dotcheck==-1)
           {
              alert("Please check your Email Address");
              document.pinfrm.email.focus();
              return false;
            }
           splitter=email1.substring(atoccurence+1,2);
           if (splitter=='.')
           {
            alert("Please check your Email Address");
            document.pinfrm.email.focus();
            return false;
            }
         if((document.pinfrm.email.value.indexOf(".")+1) == document.pinfrm.email.value.length )
         {
           alert("Please check your Email Address");
           document.pinfrm.email.focus();
           return false;
     	 }
		 }
	

	
	
  submitToServer();
}
  
function submitToServer()
	{
	document.pinfrm.action="../cgi-bin/send.php";
      // document.pinfrm.action="../../../JSPs/help/email.jsp";
       document.pinfrm.method="POST";
       document.pinfrm.submit();
    }

	

