<script type="text/javascript">
	function validatequickform(frm)
	{		
		if(Trim(frm.name.value).length < 1 || Trim(frm.name.value)=="Name")
		{
			alert("The Value For the Field \"Name\" is invalid , Please Enter Valid Value");
			frm.name.focus();
			return false;
		}
		
		if(Trim(frm.mobile.value).length < 1 || Trim(frm.mobile.value)=="Mobile" || isNaN(Trim(frm.mobile.value)) )
		{
			alert("The Value For the Field \"Mobile\" is invalid , Please Enter Valid Value");
			frm.mobile.focus();
			return false;
		}
		
		
		var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;  
		if(emailPattern.test(Trim(frm.email.value))==false || Trim(frm.email.value)=="Email")
		{
			alert("The Value For the Field \"E-mail\" is invalid , Please Enter Valid Value");
			frm.email.focus();
			return false;
		}
		
		if(Trim(frm.message.value).length < 1 || Trim(frm.message.value)=="Message")
		{
			alert("The Value For the Field \"Message\" is invalid , Please Enter Valid Value");
			frm.message.focus();
			return false;
		}
		if(Trim(frm.security_code.value).length < 1)
		 {
		  alert("The Value For the Field \"Security Code\" is invalid , Please Enter Valid Value");
		  frm.security_code.focus();
		  return false;
		 }
	}
	function Trim(s) 
	{
		// Remove leading spaces and carriage returns
		while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
		{ s = s.substring(1,s.length); }
		
		// Remove trailing spaces and carriage returns
		while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
		{ s = s.substring(0,s.length-1); }
		
		return s;
	}
   function ClearField1(Elm,Flag)
{					
	if(Flag == "1" && Elm.value == "Name" ){
		Elm.value="";
	}
	if(Flag == "0" && Elm.value == "" ){
		Elm.value="Name";
	}			
}
function ClearField2(Elm,Flag)
{					
	if(Flag == "1" && Elm.value == "Mobile" ){
		Elm.value="";
	}
	if(Flag == "0" && Elm.value == "" ){
		Elm.value="Mobile";
	}			
}
function ClearField3(Elm,Flag)
{					
	if(Flag == "1" && Elm.value == "Email" ){
		Elm.value="";
	}
	if(Flag == "0" && Elm.value == "" ){
		Elm.value="Email";
	}			
}
function ClearField4(Elm,Flag)
{					
	if(Flag == "1" && Elm.value == "Message" ){
		Elm.value="";
	}
	if(Flag == "0" && Elm.value == "" ){
		Elm.value="Message";
	}			
}
</script><form name="form1" method="post" action="reqmember" onsubmit="return validatequickform(this)">
          <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td><h3>Request for Membership</h3></td>
            </tr>
            <tr>
              <td class="space">&nbsp;</td>
            </tr>
            <tr>
              <td><table width="100%" border="0" cellspacing="3" cellpadding="0">
                <tr>
                  <td colspan="2"><input name="name" type="text" class="txt-box" id="name" style="width:320px; height:25px;" placeholder="Your Name"></td>
                </tr>
                <tr>
                  <td width="52%"><input name="email" type="text" class="txt-box" id="email" style="width:180px; height:25px;" placeholder="Email"></td>
                  <td width="48%"><input name="mobile" type="text" class="txt-box" id="mobile" style="width:125px; height:25px;" placeholder="Mobile"></td>
                </tr>
                <tr>
                  <td colspan="2"><textarea name="message" cols="45" rows="5" id="message" style="width:320px;" placeholder='Message' class="mceNoEditor"></textarea></td>
                </tr>
                <tr>
                  <td><input name="security_code" type="text" class="txt-box" id="security_code" style="width:180px; height:25px;" placeholder="Security Code"></td>
				  <td><img src="./static/security/securimage_show2.php?sid=<?php echo md5(uniqid(time())); ?>" alt="" />
				  </td>
                  
                </tr>
				<tr>
					<td></td>
					<td><input name="button" type="submit" class="btn" id="button" value="Submit"></td>
				</tr>
              </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table>
        </form>