function update_hotel_list() {
	var scity = $('#qr_city option:selected').val();
	$('#qr_hotel >option').remove();
	$('#qr_hotel').append(
		$('<option value="All">All</option>')
	);
	$.each(glvar_properties,function(i,v) {
		if ((scity=='' || v.city==scity) && v.connectname!='') {
			$('#qr_hotel').append(
				$('<option></option>').val(v.connectname).html(v.name)
			);
		}
	});
}



$(document).ready(function(){
	var hoteltype = "hoteltype",
	btnhotel = "btnhotel",
	closediv = "close",
	col2 = "col2";



	var handlermenu = function(event){
		$("a."+btnhotel).die("click");

		if ($("#"+hoteltype).is(":hidden"))
			{
				$("#"+hoteltype).slideToggle("slow",function(){
					$("#"+closediv).html('<img src="images/x2.png" />');
					$("a."+btnhotel).live("click",handlermenu);
				});
			}
		else
			{
				$("div","#"+col2).hide();
				$("#"+col2).hide();
				$("#"+hoteltype).slideToggle("slow",function(){
					$("#"+closediv).html('<img src="images/x1.png" />');
					$("a."+btnhotel).live("click",handlermenu);
				});
			}
		//$("#slidermenu a").live("click",handler);
	};

	var handlersubmenu = function(event){
		if($(this).attr("rel")!="")
			{
				$("a","#"+hoteltype).die("click");
				var classType=$(this).attr("rel");
				$("div","#"+col2).hide();
				$("#"+col2).css({ "left":0,"right":0,"display":"none","z-index":"-1" }).animate({"left": "-=250px","opacity": "toggle"}, "slow",function(){
					$('#'+classType).show();
					$("a","#"+hoteltype).live("click",handlersubmenu);
				});
			}
		else
			{
				$("div","#"+col2).hide();
				$("#"+col2).hide();
				$("#"+hoteltype).hide();
			}
	};


	$("a."+btnhotel).live("click",handlermenu);
	$("a","#"+hoteltype).live("click",handlersubmenu);
});
