
$(document).ready(function() {
//$("#transperent").hide();	
	
$(".add").hide();

$(".clearf").hide();
//for focusing on next field by pressing enter						   
$('input:text:first:not(.from)').focus();
    
$('input:text').bind("keydown", function(e) {
   var n = $("input:text,textarea:not(.repadd),select,.save,.new").length;
   if (e.which == 13) 
   { //Enter key
     e.preventDefault(); //to skip default behavior of the enter key
     var nextIndex = $('input:text,textarea:not(.repadd),select,.save,.new').index(this)+1;
     if(nextIndex < n)
       $('input:text,textarea:not(.repadd),select,.save,.new')[nextIndex].focus();
     else
     {
       $('input:text,textarea:not(.repadd),select,.save,.new')[nextIndex-1].blur();
       $('#b1').click();
	   
     }
   }
});





//hidind new button
  $(".save").click(function(){
							
							
    $(".save").hide();
    $(".new").show();
	
  });
 
 
//$(".new").hide();

$(".add").click(function(){

window.open ("bookinginsert.php","mywindow","menubar=1,resizable=1,width=850,height=575,left=350,top=100");
  });

$(".new").click(function(){
window.location="bookinginsert.php";

  });
$(".close").click(function(){
						   
window.close();

  });
$(".clearf").click(function()  {
	location.reload();
});

//hidind new button
  

$(".close1").click(function(){
window.close();

  });



 
    $("#addmas").hide();
	
	
	$('#mastertype input:button').click(function(){
	$('#message').hide();
//jSuccess(this.id);
  $('#transperent').show();	
$.post("getmaster.php",{ms_type:this.id},function(result){
	
$('#masres').html(result);	
$("#msview").createScrollableTable({
	            width: '1020px',
	            height: '450'
	        });
				$('#msview').tableFilter();	
				$('#msview thead tr:eq(0)').hide();
				$('#msview thead tr:eq(1) td:eq(0)').hide();
				$('#msview thead tr:eq(1) td:eq(1) input:text').hide();
				$('#msview thead tr:eq(1) td:last input:text').hide();
//				
//				
//				
//	  $('#transperent').hide();		
			
});//post ends

});




});









