function Validator_Enq(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Please enter your Name");
    theForm.Name.focus();
    return (false);
  }

  
  if (theForm.Email.value == "")
  {
    alert("Please enter your Email Address");
    theForm.Email.focus();
    return (false);
  }
  
  
  if  (theForm.Email.value != "")
  {   
	var eresult
	var str=theForm.Email.value
  	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (!filter.test(str))
	  {
		alert("Please enter a valid Email address!")
		theForm.Email.focus();
		eresult=false;
		return (eresult);
  	  }
  
  }    
  
  if (theForm.Visitor_Type.value == "")
  {
    alert("Please choose if you are an Exhibitor, Visitor or a Press Person");
    theForm.Visitor_Type.focus();
    return (false);
  }
    
 
  if (theForm.Enquiry.value == "")
  {
    alert("Please enter your Enquiry Details");
    theForm.Enquiry.focus();
    return (false);
  }
   
}
  



document.write("<table width='100%'  border='0' cellpadding='0' cellspacing='0'>");
document.write("<form method='POST' action='senddata_enquiry.asp' onsubmit='return Validator_Enq(this)'>");
document.write("<input name='_recipients' type='hidden' value='enquiry@fdi-expo.com'>");
document.write("<input name='_subject' type='hidden' value='Enquiry for fdiexpo'>");
document.write("<input name='_redirect' type='hidden' value='thankyou_enquiry.asp'>");


document.write("  <tr>");
document.write("    <td width='8%'>&nbsp;</td>");
document.write("    <td width='85%' valign='middle' class='link_path'>&nbsp;</td>");
document.write("    <td width='7%' valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td width='8%'>&nbsp;</td>");
document.write("    <td valign='middle' class='text_bluebg'><p align='justify'><span class='button'>Enquiry Form</span><span class='style1'><br>");
document.write("   </span></p></td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr valign='top'>");
document.write("    <td colspan='3'><img src='images/spacer.gif' width='1' height='12'></td>");
document.write("    </tr>");
document.write("  <tr>");
document.write("    <td>&nbsp;</td>");
document.write("    <td height='63' valign='top' class='bottom_text'>To make an enquiry about the exhibition, please complete the form below.</td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td width='8%'>&nbsp;</td>");
document.write("    <td height='15' valign='bottom' class='bottom_text'>Name</td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td>&nbsp;</td>");
document.write("    <td height='25' class='link_path'>");
document.write("    <input name='Name' type='text' class='outerborer' size='15'></td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td>&nbsp;</td>");
document.write("    <td height='15' valign='bottom' class='bottom_text'>Email ID</td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td width='8%'>&nbsp;</td>");
document.write("    <td height='25' class='button'><span class='link_path'>");
document.write("      <input name='Email' type='text' class='outerborer' size='15'>");
document.write("    </span></td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td>&nbsp;</td>");
document.write("    <td height='20' valign='bottom' class='bottom_text'>Choose</td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td width='8%'>&nbsp;</td>");
document.write("    <td height='25' class='button'><span class='link_path'>");
document.write("      <select name='Visitor_Type' class='outerborer'>");
document.write("        <option selected value=''>I am...</option>");
document.write("        <option value='Visitor'>A Visitor</option>");
document.write("        <option value='Exhibitor'>An Exhibitor </option>");
document.write("        <option value='Press Person'>A Press Person </option>");
document.write("      </select>");
document.write("    </span></td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td>&nbsp;</td>");
document.write("    <td height='20' valign='bottom' class='bottom_text'> Enquiry</td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td>&nbsp;</td>");
document.write("    <td valign='top'>");
document.write("    <textarea name='Enquiry' cols='16' rows='5' class='outerborer'></textarea></td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("    <td>&nbsp;</td>");
document.write("    <td height='40' valign='middle'><input type='submit' value='Submit'></td>");
document.write("    <td valign='middle' class='link_path'>&nbsp;</td>");
document.write("  </tr>");
document.write("  </form>");
document.write("</table>");