<div class="regformD hide">

 <blockquote>
  
 <blockquote> 
 
 ENTER THE FOLLOWING DETAIL TO REGISTER BUSINESS OWNER:-
 <table border=0 class ="sptab">
 
   <tr id="tdf"><td colspan=2>Date of birth  Year<font size=3 color="red"><span>*</span></font>: <select id="bodyear" name="bodyear" onchange="daysInMonthYearBod()">
 
   <option value="">year</option><?php for($yd = 1955;$yd <= 2000; $yd++){?>

   <option value="<?php echo $yd;?> "> <?php echo $yd;?> </option> <?php }?>
	
	</select>  <select id="bodmonth" name="bodmonth" onchange="daysInMonthYearBod()">
	
	<option value="">month</option><?php for($dm=1;$dm<=12; $dm++ ){ 
	if($dm >9){
	?> 
	
	<option value="<?php echo $dm;?>"> <?php echo $dm;?> </option> <?php 
	
	}else{
	?>
<option value="<?php echo "0".$dm;?>"> <?php echo "0".$dm;?> </option>
    <?php	
	}
	} ?>
	
	</select> Day<select name="dai" id= "dai" ></select>   </td></tr>
   
 <!--<tr><td> Registration no<font size=3 color="red"><span>*</span></font>:</td><td>   <input type="text" id="regno" name="regno"/>  </td></tr> -->
 
  <tr> <td>First Name<font size=3 color="red"><span>*</span></font>:</td><td><input type="text" id="fname" name="fname"/>  </td></tr>

  <tr><td>Middle Name<font size=3 color="red"><span>*</span></font>: </td><td>   <input type="text"id="mname" name="mname"/> </td></tr> 

   <tr><td>Last Name<font size=3 color="red"><span>*</span></font>: </td><td>  <input type="text" id="lname" name="lname"/> </td></tr> 
 
   <tr><td>Email Address<font size=3 color="red"><span>*</span></font>: </td> <td>  <input type="text" id="email" name="email"/> </td></tr>

   <tr><td>Phone Number<font size=3 color="red"><span>*</span></font>: </td><td>   <input type="text" id="phoneno" name="phoneno"/>  </td></tr>


   <tr><td>Birth District<font size=3 color="red"><span>*</span></font>: </td> <td> <input type="text" id="district" name="district"/>  </td></tr>
   
    <tr><td>Birth Vilage<font size=3 color="red"><span>*</span></font>: </td> <td> <input type="text" id="vilage" name="vilage"/>  </td></tr>
 
   <tr><td>Resident Town<font size=3 color="red"><span>*</span></font>: </td><td>  <input type="text" id="resi_town" name="resi_town"/> </td></tr> 
 
	<tr><td>Resident Street<font size=3 color="red"><span>*</span></font>: </td><td>  <input type="text" id="street" name="street"/> </td></tr> 

<tr><td colspan=2><center >   

<button  class ="subownreg" name="submit" > SUBMIT</button>  </center> </td></tr></table> </blockquote></blockquote>

 
</div>
<script>
$(document).ready(function(){
	
$(".subownreg").click(function(){
	
	var  year=$("#bodyear").val();
	var  month= $("#bodmonth").val();
	var  day=$("#dai").val();
	var fn=$("#fname").val();
	var mn=$("#mname").val();
	var ln=$("#lname").val();
	var em=$("#email").val();
	var phn=$("#phoneno").val();
	var dist=$("#district").val();
	var vil=$("#vilage").val();
	var rtow=$("#resi_town").val();
	var treet=$("#street").val();
	if( $.trim(treet) !="" && $.trim(rtow) !="" && $.trim(vil) !="" && $.trim(dist) !="" && $.trim(phn) !="" &&  $.trim(em) !="" &&  $.trim(ln) !="" && $.trim(mn) !="" && $.trim(fn) !="" && $.trim(day) !="" && $.trim(month) !="" && $.trim(year) !="" ){
	$.post('owner_reg_form_pro.php',{bodyear:year,bodmonth:month,dai:day,fname:fn,mname:mn,lname:ln,email:em,phoneno:phn,district:dist,vilage:vil,resi_town:rtow,street:treet},function(data){
		$("#info").html(data).show();
	}
	);	
		
	}else{alert("Information cannot be sent until all value get filled!..");}
	
	
	
	
});
});
function daysInMonthYearBod(){
	//document.getElementById("dai").innerHTML +='<option value=""> day </option>'; 
	var year = document.getElementById("bodyear").value;
	var month= document.getElementById("bodmonth").value;
	if(year=="" || month==""){
		alert("Select both month and year!...");
}
else{
	 var days = new  Date(year,month,0).getDate();
	 var j;
	 for(j=1;j <= days;j++){
		 if(j > 9){
		 document.getElementById("dai").innerHTML +='<option value="'+j+'"> '+j+'</option>';
		 }
		 else{
			 var k=0;
			 document.getElementById("dai").innerHTML +='<option value="'+k+j+'">'+k+j+'</option>'; 
		 }
	 }

}
}
 
</script>