<div class="regformD hide">

 <blockquote>
Enter customer details:-
  
 <blockquote>
 <table border=0>
 

   
 <tr><td>Customer ID<font size=3 color="red"><span>*</span></font>:</td><td>   <input type="text" id="cust_id" name="cust_id"/>  </td></tr>
  
 <tr><td>Hotel ID<font size=3 color="red"><span>*</span></font>: </td><td>   <input type="text"id="hotelid" name="hotelid"/> </td></tr> 

 <tr><td> Room no<font size=3 color="red"><span>*</span></font>:</td><td>   <input type="text" id="rono" name="rono"/>  </td></tr>
	
 <tr><td>Numbber of Night<font size=3 color="red"><span>*</span></font>: </td><td>   <input type="text"id="no_night" name="no_night"/> </td></tr> 

 <tr><td>Numbber of Guests<font size=3 color="red"><span>*</span></font>:</td><td>   <input type="text" id="no_guest" name="no_guest"/></td></tr>
 


 <tr><td>Arrived From<font size=3 color="red"><span>*</span></font>: </td> <td> <input type="text" id="arrival" name="arrival"/>  </td></tr>
   
 <tr id="tdf"><td>Departure Date<font size=3 color="red"><span>*</span></font>: </td><td><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>Departure To<font size=3 color="red"><span>*</span></font>: </td> <td> <input type="text" id="departure" name="departure"/>  </td></tr>
	
	
 <tr><td>Clerk incharge<font size=3 color="red"><span>*</span></font>: </td><td>   <input type="text"id="clerk" name="clerk"/> </td></tr> 
  
<tr><td colspan=2><center >   

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

 
</div>
<script>
$(document).ready(function(){
	
	$(".receipt").click(function(){
	var custid=	$("#cust_id").val();
	var hid =	$("#hotelid").val();
	var rm =    $("#rono").val();
	var ng =	$("#no_guest").val();
    var nn =    $("#no_night").val();
	var dyear=	$("#bodyear").val();
	var dmonth=	$("#bodmonth").val();
	var day =	$("#dai").val();
	var arriv=	$("#arrival").val();
	var depart=	$("#departure").val();
	var sig =	$("#clerk").val();
	
		
	
	if($.trim(sig) !="" && $.trim(depart) !="" && $.trim(arriv) !="" && $.trim(day) !="" && $.trim(dmonth) !="" && $.trim(dyear) !="" && $.trim(nn) !="" &&  $.trim(ng) !="" && $.trim(rm) !="" &&  $.trim(hid) !="" &&  $.trim(custid) !="" ){
		
		$.post('receit_form_pro.php',{cust_id:custid,hotelid:hid,rono:rm,no_guest:ng,no_night:nn,bodyear:dyear,bodmonth:dmonth,dai:day,arrival:arriv,departure:depart,clerk:sig},function(data){
		$("#info").empty();
        $("#info").html(data).show();		
			
		});
		
	}else{alert("Cannot sent information with some empty value in a compulsory field!..");}
	
	});
});
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>