<div id="header">

	<div class="headerleft">
		<h1><a href="./">{{$site_name}}</a></h1>
			{{$site_title}}
			<!-- <img <a href="./"src="{{$gen_img_path}}logo.gif" border="0"></img></a> -->
	</div>

	<!--Replace the # below with the ad destination url.-->

	<div class="headerright">
		<p><a href="{{$base_url}}/rss.php?rsstype=article"><img style="vertical-align:middle" src="{{$gen_img_path}}rss.gif" alt="Subscribe to " /></a><a href="{{$base_url}}/rss.php?rsstype=article">RSS Feed</a>
		<a href="{{$base_url}}/rss.php?rsstype=contents"><img style="vertical-align:middle;margin-left:10px;" src="{{$gen_img_path}}rss.gif" alt="Subscribe to " /></a><a href="{{$base_url}}/rss.php?rsstype=comments">Comments</a></p>
		{{if $ad}}
                <a href="{{$ad.url}}"><img src="{{$ad.img}}" alt="{{$ad.name}}-{{$ad.desc}}" /></a>
                {{else}}
                <a href="http://www.smartgoon.com"><img src="{{$gen_img_path}}468x60.gif" alt="Featured Ad" /></a>
                {{/if}}
	</div>

</div>

<div id="navbar">

	<div id="navbarleft">
		<ul id="nav">
			<li><a href="index.php">{{$lang.home}}</a></li>
            {{foreach from=$nav_list item=nav}}
                <li><a href="{{$nav.nav_url}}" {{if $nav.target_type eq 1}}target="_blank"{{/if}}>{{$nav.nav_name}}</a></li>
            {{/foreach}}
		</ul>
	</div>

	<div id="navbarright">
		<form id="searchform" method="get" action="./list.php">
		<input type="hidden" name="step" value="search">
		<input type="text" value="{{$lang.please_input_keyword}}" id="act" name="act" class="s" onfocus="if (this.value == '{{$lang.please_input_keyword}}') {this.value = '';}" onblur="if (this.value == '') {this.value = '{{$lang.please_input_keyword}}';}" />
		<input type="button" onclick="fnSubmit();" value="Search" /></form>
	</div>

</div>
<script type="text/javascript">
var fnSubmit = function() {
	var keywords = $('act').value;
	if ('' != keywords && keywords != '请输入您要查询的关键字...') {
		$('act').value = encodeURI($('act').value);
		$('searchform').submit();
	}
}
</script>
