<!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>$keywords_array[k_title]</title>
	<meta name="keywords" content="$keywords_array[k_keywords]" />
	<meta name="description" content="$keywords_array[k_description]" />
	<link href="{$BASE_V}style.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>	
</head>
<body>
<!--{template inc/header}-->
<div id="maincontent">
  <div class="index_content">
	  <div class="lians_cotn">
            <div class="qiehuan">
               <ul class="left2_ul">
                  <li class="sel01"><span class="color1">品牌列表</span></li></ul>
            </div>
          <div class="ls_hotel">
	         <h4>经济型连锁酒店</h4>
	         <div class="ls_pp">
			      <!--{model:liansuo getchain(0, 100) return=chain_array}-->                          
			      <!--{loop $chain_array $v}-->	         
	             <a title="$v[chain_name]" href="javascript:cityHotel('chain_e_$v[chain_id]',$v[chain_id])"><img width="50" height="40" alt="$v[chain_name]" src="{$ZNpicurl}{$v[picture]}" id="chain_e_$v[chain_id]">$v[chain_name]</a>
	             <!--{/loop}-->
	         </div>
          </div>	  
          <div class="ls_hotel">
	         <h4>星级连锁酒店预订 </h4>
	         <div class="ls_pp">
	         	<!--{model:liansuo getchain(0, 100, 1) return=start_chain_array}-->
	         	<!--{loop $start_chain_array $v}-->
	            <a title="$v[chain_name]" href="javascript:cityHotel('chain_x_$v[chain_id]',$v[chain_id])" id="chain_x_$v[chain_id]"><img width="50" height="40" alt="$v[chain_name]" src="{$ZNpicurl}{$v[picture]}">$v[chain_name]</a>
	            <!--{/loop}-->
	         </div>
          </div>          
        </div>
  </div>
<!--{template inc/footer}-->
</div>
<div id="chain_city" class="xianshi" style="top: 277px; left: 351px; display:none;">
	<h3>城市品牌连锁<img onclick="closeT();" style="cursor:pointer;" src="{$BASE_V}images/c_close.gif"></h3>
	<ul>
		<li></li>
	</ul>
</div>	  
<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");
j.includecss("{$BASE}js/calendar/city_menu.css");
$(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)));
});
	
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.length == 0){
				 alert("木有数据");
			}
			$("#chain_city ul").html("");
			var dataObj=eval('('+ data +')'); 
			var top = $("#"+obj+"").position().top + 90;
			var left = $("#"+obj+"").position().left;
			if ((left + 418) > document.body.clientWidth) {
				 left = left - 286;
			}			
			$.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>
</body>
</html>