<?php if(!class_exists('Template')) die('Access Denied'); $this->tpl->check('inc\header.html', 'd3d5bff0ae71cfc7dfc55ae5ecc29028', 1362478748); ?>

<script type="text/javascript">
function addFavorite(sURL, sTitle) {
	try { window.external.addFavorite(sURL, sTitle); }
	catch(e) {
		try { window.sidebar.addPanel(sTitle, sURL, ""); }
		catch(e) { alert("加入收藏失败，请使用Ctrl+D进行添加"); }
	}
}
function setHome(obj, vrl) {
	try { obj.style.behavior = 'url(#default#homepage)'; obj.setHomePage(vrl); }
	catch(e) {
		if (window.netscape) {
			try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
			catch(e) {
				alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");
			}
			var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
			prefs.setCharPref('browser.startup.homepage', vrl);
		}
	}
}
$(function() {
	$(".login-sign-more").click(function() {
		var offset = $(this).offset();
		$(".login-form-box").css({ left:offset.left - 217, top:offset.top + 20 }).show();
	});
	$(".login-form-box").mouseleave(function() {
		var v_account = $("#login-account").val().replace(/ /g, '').replace(/'/g, '');
		var v_password = $("#login-password").val().replace(/ /g, '').replace(/'/g, '');
		if(v_account == "" && v_password == "") {
			$(this).hide();
			$("#login-form")[0].reset();
		}
	});
	$("#login-form .form-btn button").click(function() {
		var v_account = $("#login-account").val().replace(/ /g, '').replace(/'/g, '');
		var v_password = $("#login-password").val().replace(/ /g, '').replace(/'/g, '');
		var tips = "";
		if(v_account == "") {
			tips += "帐号";
		}
		if(v_password == "") {
			tips += (tips != "" ? "，" : "") + "密码";
		}
		if(tips != "") {
			$(".form-errtip").html(tips + "不能为空。").show();
		} else {
			$("#login-form").attr("action", root + "?m=login.check").ajaxSubmit({
				success: function(data) {
					var ary = eval("(" + data + ")");
					if(ary[0] == "success") {
						window.location.reload();
					} else {
						$(".form-errtip").html(ary[1]).show();
					}
				}
			});
		}
	});
});
</script>
<section class="top-bar clearfix">
<nav>
<a title="" href="javascript:;">繁体版</a>
|
<a title="" href="javascript:;" onclick="javascript:addFavorite('<?php echo DOMAIN; echo ROOT; ?>','<?php echo $siteInfo['name']; ?>');">喜欢就收藏吧</a>
|
<a title="" href="javascript:;" onclick="javascript:setHome(this,'<?php echo DOMAIN; echo ROOT; ?>');">设为首页</a>
|
<a title="" href="javascript:;">网站导航</a>
</nav>
</section>

<header id="header">
<article class="clearfix">
<div class="logo"><a title="<?php echo $siteInfo['name']; ?>" href="<?php echo DOMAIN; echo ROOT; ?>"><img alt="<?php echo $siteInfo['name']; ?>logo" src="<?php echo DOMAIN; echo ROOT; echo $siteInfo['logo']; ?>" /></a></div>
<div class="search">
<form name="search-form" class="search-form" method="post" action="<?php echo DOMAIN; echo ROOT; ?>?m=hotel.setSearchSession">
<span class="search-word-bg"><input type="text" onfocus="this.value=='城市、标志物、酒店名称、品牌、地址'?this.value = '':this.value=this.value" onblur="this.value==''?this.value = '城市、标志物、酒店名称、品牌、地址':this.value=this.value" name="word" class="search-word" value="城市、标志物、酒店名称、品牌、地址" maxlength="256" /></span>
<button type="button" class="search-btn">搜索一下</button>
</form>
</div>
</article>

<nav class="nav clearfix">
<ul class="nav-channel">
<li<?php if($navType=='') { ?> class="current"<?php } ?>><a title="" href="<?php echo DOMAIN; echo ROOT; ?>">首页</a></li>
<li<?php if($navType=='search' || $navType=='hotel') { ?> class="current"<?php } ?>><a title="" href="<?php echo DOMAIN; echo ROOT; ?>hotel/search.html">酒店</a></li>
<li<?php if($navType=='map') { ?> class="current"<?php } ?>><a title="" href="<?php echo DOMAIN; echo ROOT; ?>map.html">电子地图</a></li>
</ul>
<ul class="nav-login txt-white clearfix">
<?php if($loginInfo['id']>0) { ?>
<li><a title="" href="<?php echo DOMAIN; echo ROOT; ?>?m=login.logout">退出</a></li>
<li><a title="" href="<?php echo DOMAIN; echo ROOT; ?>?m=member">会员中心</a></li>
<li><?php echo $loginInfo['name']; ?>，欢迎光临！</li>
<?php } else { ?>
<li class="login-sign"><a title="" href="<?php echo DOMAIN; echo ROOT; ?>?m=login">登录</a><div class="login-sign-more"><b></b></div></li>
<li><a title="" href="<?php echo DOMAIN; echo ROOT; ?>?m=login">免费注册</a></li>
<?php } ?>
</ul>
</nav>

<div class="login-form-box">
<form id="login-form" name="login-form" method="post">
<div class="form-errtip txt-red"></div>
<dl class="clearfix">
<dt>帐号：</dt>
<dd><input type="text" id="login-account" name="account" class="form-input" /></dd>
</dl>
<dl class="clearfix">
<dt>密码：</dt>
<dd><input type="password" id="login-password" name="password" class="form-input" /></dd>
</dl>
<div class="form-btn"><button type="button">确定</button></div>   
</form>
</div>
</header>
