// === Get/Hide/Show/Toggle ===  src="suggest/base.js"

function ge()
{
  var ea;
  for( var i = 0; i < arguments.length; i++ ) {
    var e = arguments[i];
    if( typeof e == 'string' )
      e = document.getElementById(e);
    if( arguments.length == 1 )
      return e;
    if( !ea )
      ea = new Array();
    ea[ea.length] = e;
  }
  return ea;
}

function jquery_send_post(valuekey,type) {

	var url = "js_post.php";
	var data_post = "valuekey=" + valuekey + "&type=" + type;
	
	//var url = $('.moi_nhat_path').val();
	//var total = $('.moi_nhat_total_page').val();
		$.ajax({
		   beforeSend: function(){
		   //$('#loading-layer').show();
		   //$('#content_div').fadeTo("slow",0.1);
		   },
		   type: 'POST',
		   dataType: 'html',
		   url : url,
		   data: data_post,
		   success: function(msg){
	   	 	//$('#temp_div').children().remove();
	     	//$('#temp_div').html(msg);
		   }
		});
}

function jquery_updateBook() {

	var url = "js_bookhotel.php";
	var hotel_cityID = $('#hotel_cityID').val();
	var hotel_level = $('#hotel_level').val();
	var hotel_price = $('#hotel_price').val();
	if (hotel_cityID=='')
	{
		alert("Please choose city !");
		return false;
	}
	if (hotel_level=='')
	{
		alert("Please choose star !");
		return false;
	}
	var data_post = "hotel_cityID=" + hotel_cityID + "&hotel_level=" + hotel_level + "&hotel_price=" + hotel_price;
	
	
	//var total = $('.moi_nhat_total_page').val();
		$.ajax({
		   beforeSend: function(){
		    $('#loading-layer').show();
		   	$('#content_div').fadeTo("slow",0.1);
		   },
		   type: 'POST',
		   dataType: 'html',
		   url : url,
		   data: data_post,
		   success: function(msg){
		   	$('#loading-layer').hide();
	   	 	$('#content_div').children().remove();
	     	$('#content_div').html(msg);
	     	$('#content_div').fadeTo("slow",1,function(){
				//changeBorder('.moi_nhat_border');
				//alert('Cache thanh cong !');
	     	});
		   }
		});
}