// JavaScript Document
function GetRoom(Obj,HID,tm1,tm2,Path,Callback)
{
	var ajaxpath=Path+'ajax/Booking_Room.aspx?id='+HID+'&tm1='+tm1+'&tm2='+tm2;
	ajaxpath=ajaxpath.toLowerCase().replace('resource/template/html/','resource/template/aspx/');
	var Breakfast=new Array("无","含早","双早","有(收费)");
	$.ajax({
		type:'GET',cache:false,
		url:ajaxpath,
		dataType:'xml',
		success:function(xml){
				$(Obj).html('');
				$(xml).find('x>t').each(function(){
					var D = new Date($(this).attr('date').replace(/-/g,'/'));
					$(Obj).append('<div>'+(D.getMonth()+1)+'/'+D.getDate()+' 早餐：'+Breakfast[$(this).attr('breakfast')]+' ￥'+$(this).attr('price')+'.0/晚 奖金：￥'+$(this).attr('bonus')+'/间/夜</div>');
				});
				var D1 = new Date($(xml).find('x>t:first').attr('date').replace(/-/g,'/'));
				var D2 = new Date($(xml).find('x>t:last').attr('date').replace(/-/g,'/'));
				var Count=$(xml).find('count');
				var DM1,DM2,DD1,DD2;
				DM1=D1.getMonth()+1;DM2=D2.getMonth()+1;
				DD1=D1.getDate();DD2=D2.getDate();
				var Temp='<div>'+DM1+'-'+DD1+'至'+DM2+'-'+DD2;
				Temp+=':<strong>￥<span id="CountPrice">';
				Temp+=$(Count).attr('price');
				Temp+='.0</span></strong> 返 <strong>￥<span id="CountBonus">';
				Temp+=$(Count).attr('bonus');
				Temp+='</span></strong>(1间房)</div>';
				$(Obj).append(Temp);
				if(typeof(Callback)=='function')Callback();
				//$(Obj).append('<div>'+DM1+'-'+DD1+'至'+DM2+'-'+DD2+':<strong>￥<span id="CountPrice">'+String($(Count).attr('price'))+'\.0</span></strong> 返 <strong>￥<span id="CountBonus">'+String($(Count).attr('bonus'))+'</span></strong>(1间房)</div>';
				}
		});	
}