function check()
{
   if(form1.name.value=="")
  {
   alert("please enter the Name");
   form1.name.focus();
   return false;
   }  
   
       if(form1.company.value=="")
  {
   alert("please enter the Company Name");
   form1.company.focus();
   return false;
   }  
    
    if(form1.address.value=="")
  {
   alert("please enter the Address");
   form1.address.focus();
   return false;
   }  
    if(form1.phone.value=="")
  {
   alert("please enter the Phone number");
   form1.phone.focus();
   return false;
   }  
    
     if(form1.email.value=="")
	{
	  alert("Please enter email id");
	  form1.email.focus();
	  return false;
	}else
	{
		 var emailStr=form1.email.value;
		 // checks if the e-mail address is valid
		  var emailPat = /^(\".*\"|[A-Za-z]\w*|[A-Za-z]\w*(\.?\w*))@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
		   var matchArray = emailStr.match(emailPat);
		   if (matchArray == null)
		{
		      alert("Your email address seems incorrect.  Please try again (check the '@' and '.'s in the email address)");
			  form1.email.focus();
               return false;   
		     }				
    }
	
	

}
