<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$cfg_webname}-酒店预订帮助中心</title>
<meta name="description" content="{$cfg_webname}-酒店预订为您提供最权威,最新的酒店点评数据,国内酒店预订,国内宾馆预定等服务" />
<meta name="keywords" content="{$cfg_webname}-酒店预订,酒店点评,哪个酒店好" />
<link href="{$BASE_V}style.css" rel="stylesheet" type="text/css" />
<link href="{$BASE_V}jquery.autocomplete.css" rel="stylesheet" type="text/css" />
<script language="javascript">var webpath="{$BASE}";</script>
<script type="text/javascript" src="{$BASE}js/calendar/jquery.min.js"></script>
<script type="text/javascript" src="{$BASE_V}js/jquery.autocomplete.js"></script>
</head>
<body>
<DIV class="search_content search_ba">
                                <form id="form_hotel" name="form_hotel" method="post" action="index.php?m=hotellist" onSubmit="return checkindex();">
            <TABLE id=tab_top_hotel cellSpacing=0 cellPadding=0>
                <TBODY>
                    <TR>
                        <TD width=54 height=30><label for="txtCity">入住城市</label>
                        </TD>
                        <TD><input name="cityid" id="cityid" type="hidden" value="53" />
                            <input name="txtCity" id="txtCity"  autocomplete="off"  class="input02" type="text" value="北京"  value="中文/拼音" onclick="suggestH.display(this,'',event);">
                            <DIV class=errMasBorder id=hotelCityErr style="DISPLAY: none"><SPAN 
              class=lefSpan></SPAN><SPAN class=rgtSpan>请输入城市名称</SPAN> </DIV></TD>
                    </TR>
                    <TR>
                        <TD width=54 height=30><label for="tm1">入住日期</label>
                        </TD>
                        <TD><input type="text" onClick="javascript:event.cancelBubble=true;showCalendar('tm1',false,'tm1','tm2','tm2',''+ZNDate.format(ZNDate.today())+'',''+ZNDate.format(ZNDate.plus(ZNDate.today(),60))+'','','','','SWeek','')" class="input02" onBlur="javascript:this.value=this.value.replace(/[^\d\-]/g,'');" id="tm1" value="" name="tm1" />
                            <DIV id=input_date1></DIV></TD>
                    </TR>
                    <TR>
                        <TD width=54 height=30><label for="tm2">离店日期</label>
                        </TD>
                        <TD><input type="text" onClick="javascript:SelHotelCalMethod(event,'out','tm1','tm2',''+ZNDate.format(ZNDate.plus(ZNDate.today(),60))+'');" onBlur="javascript:this.value=this.value.replace(/[^\d\-]/g,'');" class="input02" id="tm2" value="" name="tm2">
                            <DIV id=input_date2></DIV>
                            <DIV class=errMasBorder id=hotelTimeErr style="DISPLAY: none"><SPAN 
              class=lefSpan></SPAN><SPAN 
              class=rgtSpan>如果您需要在酒店入住20天以上，请致电400-710-1007转1，我们会竭诚为您服务。</SPAN> </DIV></TD>
                    </TR>
                    <TR>
                        <TD width=54 height=30><label for="hn">酒店信息</label>
                        </TD>
                        <TD><input name="hn" type="text" class="input02" id="hn" onclick="value=''" value="酒店名/地址"/>
                            <DIV id=hotelInfo_list>
                                <DIV class=hotel_sou_xinxi id=hotelInfo 
            style="DISPLAY: none"></DIV>
                            </DIV></TD>
                    </TR>
<TR>
                <TD width=54 height=30><label for="hs">附近地标</label> </TD>
                <TD><input name="key" type="text" class="input02" id="hs" onclick="value=''" value="地标/位置"/></TD></TR>                  
                    <TR>
                        <TD height=30>&nbsp;</TD>
                        <TD><input class="btn01" id="hotelSubmit"  type="submit" value="搜索">
                    </TR>
                </TBODY>
            </TABLE>
        </form>
<script type="text/javascript"> 
$("#hotelSubmit").click(function(){
    var hn = $("#hn");
    var keyword = $("#hs");
    if (hn.val() === "酒店名/地址") {
        hn.attr("value","");
    }
    if (keyword.val() === "地标/位置") {
        keyword.attr("value","");
    }    
});
 
</script>   
                    </DIV>

</body>
</html>
<script type="text/javascript">
j.include("{$BASE}js/calendar/Date.js","{$BASE}js/calendar/calendar.js","{$BASE}js/calendar/citys.js","{$BASE}js/calendar/city_menu.js","{$BASE}js/zhuna-js/mapbar31.2.js");
j.includecss("{$BASE}js/calendar/city_menu.css","{$BASE}js/zhuna-js/nyroModal.css");
var stockInfoJson = [
                     { name: "北京", code: "beijing",spell:"bj" },
                     { name: "上海", code: "shanghai",spell:"sh"},
                     { name: "广州", code: "000004",spell:"stgn" },
                     { name: "世纪星源", code: "000005",spell:"sjxy" },
                     { name: "深振业A", code: "000006" ,spell:"szya"},
                     { name: "ST 达 声", code: "000007" ,spell:"stds"},
                     { name: "ST宝利来", code: "000008" ,spell:"stbll"},
                     { name: "中国宝安", code: "000009" ,spell:"zgba"},
                     { name: "S ST华新", code: "000010" ,spell:"ssthx"},
                     { name: "山航B", code: "200152" ,spell:"shb"},
                     { name: "*ST帝贤B", code: "200160" ,spell:"stdxb"},
                     { name: "雷伊B", code: "200168" ,spell:"lyb"},
                     { name: "宝石B", code: "200413",spell:"bsb" },
                     { name: "小天鹅B", code: "200418" ,spell:"xteb"},
                     { name: "粤高速B", code: "200429" ,spell:"agsb"},
                     { name: "宁通信B", code: "200468" ,spell:"ltxb"},
                     { name: "晨鸣B", code: "200488" ,spell:"cmb"},
                     { name: "珠江B", code: "200505" ,spell:"zjb"},
                     { name: "闽灿坤B", code: "200512" ,spell:"mskb"},
                     { name: "华电国际", code: "600027" ,spell:"hdgj"},
                     { name: "z华电国际", code: "600027" ,spell:"hdgj"}
                 ];
$(function(){
if(!$("#tm1").val())$("#tm1").val(ZNDate.format(ZNDate.plus(ZNDate.today(),0)));
if(!$("#tm2").val())$("#tm2").val(ZNDate.format(ZNDate.plus(ZNDate.today(),3)));
$("#index_com .ib_con dl dd,#index_ask .ib_con dl dd").each(function(){$(this).simpletooltip({br:true});});
});

$("#txtCity").keydown(function(){
	$("#top_getplatform").hide();
	$("#top_getiframe").hide();
});
$("#txtCity").autocomplete(stockInfoJson, {
	max: 12,
	minChars: 1,
    matchCase:false,//不区分大小写
    autoFill: false,
    max: 10,
    formatItem: function(row, i, max,term) {
        var v = $("#suggest1").val();       
        return  row.name + " (" + row.code + ")";
        if(row.code.indexOf(v) == 0 || row.spell.indexOf(v)==0)
        {
            return  row.name + " (" + row.code + ")";
        }
        else
            return false;
    },
    formatMatch: function(row, i, max) {
        return row.name + " (" + row.code+")";
    },
    formatResult: function(row) {
        return row.name;
    },
    reasultSearch:function(row,v)//本场数据自定义查询语法 注意这是我自己新加的事件
    {
        //自定义在code或spell中匹配
        if(row.data.code.indexOf(v) == 0 || row.data.spell.indexOf(v) == 0)
        {
            return row;
        }
        else
            return false;           
    }           
}).result(function(event, data, formatted) {
    $("#cityid").attr("value",324);
});

function cityHotel(obj,chain_id)
{
	$.ajax({
	url : "{PHP_SELF}?m=ajkeyword.getCityHotel",
	type : 'POST',
	data: ({chain_id:chain_id}),
	dataType: "html",
	beforeSend : function(data){$("#chain_city ul").html("查询中...........").show();},
	success : 
		function(data)
		{
			if(data==null){
				 alert("木有数据");
			}
			$("#chain_city ul").html("");
			var dataObj=eval('('+ data +')'); 
			var top = $("#"+obj+"").position().top + 90;
			var left = $("#"+obj+"").position().left;
			if ((top + 200) > document.body.clientHeight) {
				 top = top - 180;
			}			
			$.each( dataObj,function(idx, items){
				cityhtml = "<li><a href=\"{PHP_SELF}?m=hotellist&chain_id="+chain_id+"&cityid="+items.cityid+"\">"+items.cityname+"<\/a><\/li>";
				$("#chain_city ul").append(cityhtml);
			});
			$("#chain_city").css({
						"top": top  + 'px',
						"left": left  + 'px'
					});			
			$("#chain_city").fadeIn("slow");
		}
	,
	timeout:5000,
	error: 
		function () {
			alert("请求超时请重试!");
		}
	});
}

function closeT()
{
	$("#chain_city").fadeOut("slow");
}
</script>
