  function enquiry()
 {
	 

 
  if(document.getElementById("txtcompany").value=="")
   {
      alert("PLEASE ENTER COMPANY NAME") 
      return false;
   }

        if(document.getElementById("txtname").value=="")
   {
      alert("PLEASE ENTER YOUR NAME") 
      return false;
   }
        if(document.getElementById("txtdesignation").value=="")
   {
      alert("PLEASE ENTER DESIGNATION") 
      return false;
   }   
  
        if(document.getElementById("txtaddress").value=="")
   {
      alert("PLEASE ENTER ADDRESS") 
      return false;
   }
   
      	var tax_id = parseInt(document.getElementById("txtphone").value);
	if (isNaN(tax_id)) 
	{
		alert("PLEASE ENTER CONTACT NUMBER");
		return false;
	}
   
        if(document.getElementById("txtphone").value=="")
   {
      alert("PLEASE ENTER CONTACT NUMBER") 
      return false;
   } 
   
         	var tax_id = parseInt(document.getElementById("txtfax").value);
	if (isNaN(tax_id)) 
	{
		alert("PLEASE ENTER FAX NUMBER");
		return false;
	}
   
        if(document.getElementById("txtfax").value=="")
   {
      alert("PLEASE ENTER FAX NUMBER") 
      return false;
   } 
   
     
   
 		var regex = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 		if(document.getElementById("txtemail").value=="")
 		{
 			alert("PLEASE ENTER YOUR EMAIL ADDRESS");
 			return false;
 		}
 		else if(!regex.test(document.getElementById("txtemail").value))
 		{
 			alert("Invalid email address format");
 			return false;
 		}
		
		
        if(document.getElementById("txtproduct").value=="")
   {
      alert("PLEASE ENTER PRODUCT") 
      return false;
   }   


        if(document.getElementById("txtinquire").value=="")
   {
      alert("PLEASE ENTER INQUIRE") 
      return false;
   } 
 }
 
function resetfun()
{
	
   document.forms['frm_enquiry'].txtcompany.value=''
   document.forms['frm_enquiry'].txtname.value=''
   document.forms['frm_enquiry'].txtdesignation.value=''
   document.forms['frm_enquiry'].txtaddress.value=''
   document.forms['frm_enquiry'].txtphone.value=''
   document.forms['frm_enquiry'].txtfax.value=''
   document.forms['frm_enquiry'].txtemail.value=''
   document.forms['frm_enquiry'].txtproduct.value=''
   document.forms['frm_enquiry'].txtinquire.value=''
}