document.write ("<div id='show' class='JJ_showLayer' style='display:none;position:absolute'>");
document.write ("(1)点评奖金：是指您通过128旅行网预订酒店并且入住后，返回登陆128旅行网，");
document.write ("对您入住的酒店发表点评，经我们核实后，由我们网站返给您的现金奖励；<br/>");
document.write ("(2)点评奖金是由128旅行网站促销返还的，与酒店无关，所以您不能向酒店前台索要；<br/>");
document.write ("(3)每次的点评奖金暂存入您在128旅行网的会员账户，当您账户金额达到200元时，即可申请提现。<br/>");
document.write ("</div>");

function loadroom_info(hotel_id,intime,outtime) {
	var url="/hotel/innslist/roominfo.asp?top=0&hid="+hotel_id+"&intime="+intime+"&outtime="+outtime;
	$.ajax({
		type: "GET",
		url: url,
		dataType: 'text',
		timeout: 25000,
		error: function() {
			    $("#common_table"+hotel_id).css("display","block");
				$("#common_table"+hotel_id).html("<tr><td colspan='9'><b style='font-size: 14px;color:#ff8000;'>非常抱歉，获取实时价格失败，该酒店暂时不能预定</td></tr>");				
		},
		success:function(data){
				$("#common_table"+hotel_id).css("display","block");
				RoomInfo($("#common_table"+hotel_id),data)
		}			
	});}	
	
function hide_room_info(hotel_id){
$("#common_table"+hotel_id).css("display","none");$("#room_show"+hotel_id).css("display","block");$("#room_hide"+hotel_id).css("display","none");
}
function show_jjtishi(event){
 event = event||window.event;
  var obj = document.getElementById("show");
   obj.style.display="block";
        if(document.documentElement){
            obj.style.top = event.clientY + document.documentElement.scrollTop+5+"px";
            obj.style.left =event.clientX + document.documentElement.scrollLeft-240+"px";
        }
        else
        {
        obj.style.top = event.pageY+5+"px";
        obj.style.left = event.pageX-240+"px";
        }
}
document.write ("<div id='show_map' class='JJ_showLayer' style='display:none;position:absolute'>");
document.write ("(1)128旅行网通过地图定位技术帮您搜索酒店，本距离数值基于google地图数据，仅供参考；<br/>");
document.write ("(2)所示距离为两目的地之间的直线距离，实际行车或步行距离将稍大于该距离。");
document.write ("</div>");

function show_jjtishi_map(event){
 event = event||window.event;
  var obj = document.getElementById("show_map");
   obj.style.display="block";
        if(document.documentElement){
            obj.style.top = event.clientY + document.documentElement.scrollTop+5+"px";
            obj.style.left =event.clientX + document.documentElement.scrollLeft-240+"px";
        }
        else
        {
        obj.style.top = event.pageY+5+"px";
        obj.style.left = event.pageX-240+"px";
        }
}

document.write ("<div id='show_jifen' class='JJ_showLayer' style='display:none;position:absolute'>");
document.write ("(1)会员提问可获积分，积分可用于后续推出的各类优惠促销活动；<br />");
document.write ("(2)以会员身份提问，方可以在会员中心查看到历史提问记录；<br />");
document.write ("(3)网友可以筛选查看到您的所有问题，分享您作为资深住客的各类想法。");
document.write ("</div>");

function show_question_jifen(event){
 event = event||window.event;
  var obj = document.getElementById("show_jifen");
   obj.style.display="block";
        if(document.documentElement){
            obj.style.top = event.clientY + document.documentElement.scrollTop+5+"px";
            obj.style.left =event.clientX + document.documentElement.scrollLeft-240+"px";
        }
        else
        {
        obj.style.top = event.pageY+5+"px";
        obj.style.left = event.pageX-240+"px";
        }
}
document.write ("<div id='show_tishi' class='JJ_showLayer' style='display:none;position:absolute'>");
document.write ("(1)128旅行网为全国超过15000家酒店提供预订平台及信息技术服务，酒店房价及房态由各家酒店独立决定，有可能因酒店未及时更新而导致部分信息不准确；<br />");
document.write ("(2)128旅行网为超过130万会员提供酒店预订服务，一般情况下，订单确认后您只需到达前台时付款，无需提前预付房费（特殊时期或极个别酒店除外）。<br />");
document.write ("</div>");

function show_shouming(event){
 event = event||window.event;
  var obj = document.getElementById("show_tishi");
   obj.style.display="block";
        if(document.documentElement){
            obj.style.top = event.clientY + document.documentElement.scrollTop+5+"px";
            obj.style.left =event.clientX + document.documentElement.scrollLeft-240+"px";
        }
        else
        {
        obj.style.top = event.pageY+5+"px";
        obj.style.left = event.pageX-240+"px";
        }
}
function hide_question_jifen(){$("#show_jifen").css("display","none");}
function hide_jjtishi_map(){$("#show_map").css("display","none");}
function hide_cxiao(){$("#cxiao_pop").css("display","none");}
function show_cxiao(){$("#cxiao_pop").css("display","block");}
function hide_jjtishi(){$("#show").css("display","none");}
function hide_shouming(){$("#show_tishi").css("display","none");}

//价格处理
function RoomInfo(obj,data){
        obj.html(data);
		$(".hotel_name").each(function(){
									   $(this).children("td:first").click(function(){							
										var _this=$(this).parent().next(".showxiangq").children("td:first")									
										_this.show();
										_this.children("a").click(function(){_this.hide();								
										return false})
										return false;})
										});
		$(".everyday_price").hover(function(e){
			var Arr=this.id.split("@"),Week=Arr[0].split("|"),PriceList=Arr[1].split("|"),len=PriceList.length;
			var k=(len>7)?7:len,width=k*55,Html=[],obj=$("#price_tip");//显示日期
			Html.push("<table style='with:"+width+"px'><tr>");
			for(var i=0;i<k;i++){Html.push("<td style=' padding:3px 5px;border-bottom: 1px solid #ff8000; border-right: 1px solid #ff8000; color:#fff; background: #ff9c39;'>"+GetWeekName(Week[i])+"</td>")}
			Html.push("</tr><tr>")
			for(var i=0;i<len;i++){
				Html.push("<td style=' padding:3px 5px;border-bottom: 1px solid #ff8000; border-right: 1px solid #ff8000;'>"+PriceList[i]+"</td>");
				if(i>5){if(parseInt((i+1)%7)===0){Html.push("</tr>")}};//处理转行
				}
			if (parseInt((i+1)%7)===0){Html.push("</table>")}else{Html.push("</tr></table>")}	;
            var pos=GetMousePoint(e);//获得鼠标的位置
			obj.css({top:pos.top+10+"px",left:pos.left-40+"px"});
			obj.html(Html.join("")).show();
		},function(){
			$("#price_tip").hide()
			})
		}
		function GetWeekName(s){return '周'+'日一二三四五六'.charAt(s)}
		function GetMousePoint(event){
		var top=0,left=0;
		event = event||window.event;
        if(document.documentElement){
            top = event.clientY + document.documentElement.scrollTop;
            left =event.clientX + document.documentElement.scrollLeft;
			return 	{"top":parseInt(top),"left":parseInt(left)}
        }else{
			return 	{"top":parseInt(event.pageY),"left":parseInt(event.pageX)}
			}
		}
 function huanjing(){
	var city_id=getThreeWordByCitysFlight($("#hCity").val());
		if ($("#map_name").val()==""){
			$('#search_key').html('请输入地名查找：');
		}else{
		$.get("/hotel/search-round.asp?cid="+city_id+"&search_val="+$("#map_name").val()+"&sel_inputid=map_name", function (data){$('#search_key').html(data);});
		}
	}
$(document).keypress(function(e){if(e.keyCode==13){if (document.activeElement.id!="hCity" &&document.activeElement.id!="reg_login_uname"&&document.activeElement.id!="reg_login_pwd"&&document.activeElement.id!="loginbtn"){document.getElementById("index_searchbtn").click();}}});
