function validate()
{
flag=true;

   if((document.frm.name.value=="")) 
  {
   flag=false;
   alert("Enter your Name");
   document.frm.name.focus();
   document.frm.name.select();
   return flag;
  } 

    if((flag) && (document.frm.comname.value==""))
  {
   flag=false;
   alert("Enter Your Company Name");
   document.frm.comname.focus();
   document.frm.comname.select();
   return flag; 
  }
   
   if((flag) && (document.frm.address.value==""))
  {
   flag=false;
   alert("Enter your Address");
   document.frm.address.focus();
   document.frm.address.select();
   return flag;
  }

   if((flag) && (document.frm.country.value==""))
  {
   flag=false;
   alert("Enter your Country");
   document.frm.country.focus();
   document.frm.country.select();
   return flag;
  }

   if((flag) && (document.frm.city.value==""))
  {
   flag=false;
   alert("Enter your City");
   document.frm.city.focus();
   document.frm.city.select();
   return flag;  
  }

   if((flag) && (document.frm.zip.value=="") ||(isNaN(document.frm.zip.value)))
  {
   flag=false;
   alert("Enter your Zip / Postal Code");
   document.frm.zip.focus();
   document.frm.zip.select();
   return flag;
  }

   if((flag) && ((document.frm.email.value).indexOf("@")<=0 || (document.frm.email.value).indexOf(".")<=2 || (document.frm.email.value).indexOf("/")>0) || (document.frm.email.value).indexOf(".")==(document.frm.email.value).indexOf("@")+1)
 { 
   flag=false;
   alert("enter valid email address"); 
   document.frm.email.focus();  
   document.frm.email.select();  
   return flag;
 }
  if((flag) && (document.frm.product.value=="0"))
 { 
   flag=false;
   alert("Select the Product or Services !!"); 
   document.frm.product.focus();  	
   document.frm.product.select();  
   return flag;
 }
   if((flag) && (document.frm.enquiry.value==""))
 { 
   flag=false;
   alert("Enter your Enquiry/Comments"); 
   document.frm.enquiry.focus();  	
   document.frm.enquiry.select();  
   return flag;
 }

return flag; 
}
