<div class="header_db_top">
<script src="<?=$navheadurl?>template/<?=MOBAN?>/js/function.js"></script>
<div class="navtop">
<div class="logo"><A href="<?=$navheadurl?>index<?=$end?>" <?php if($tag=='index'){echo "class=current";}?> title="快乐购物，美在其中" ><img src="<?=$navheadurl?>template/<?=MOBAN?>/images/logo.gif" /></A></div>

<?php if($tag=='tg'){?>
<div style="float:left; margin-left:15px;">
<div class="tuangouflsy_logo_span2">
       <span class="tuangouflsy_logo_span3" style="margin-bottom:3px;position:relative; display:none;"><?=$cur_city?></span>
       <span class="tuangouflsy_logo_span3" style="position:relative; z-index:999;"><input class="submit1" type="button" name="button" id="button" value="" onclick="open_city(this)" style="display:none"/>

<div class="tuangouflsy_pf" style="display:none;" onclick="clickDiv(this)" id="div"><span class="tuangouflsy_pf_guanbi"><a href="javascript:void(0)" onclick="close_city()">关闭</a></span>
   <div class="tuangouflsy_pf_zhongdian">
     <ul>
       <li>
          <span class="tuangouflsy_pf_span1">核心城市</span>
          <span class="tuangouflsy_pf_span2">
          <?php foreach($city_sort_arr as $k=>$v){?>
          	<span class="tuangouflsy_pf_span3"><a href="tg<?=$url_head_city_id?><?=$k?><?=$url_end?>"><?=$v?></a></span>
          <?php }?>
          </span>
       </li>
        <li style="margin-bottom:10px;"><span class="textcolor1" >请按照拼音首字母来选择城市</span></li>
     </ul>
      <div style="clear:both"></div>
   </div>
   <div class="tuangouflsy_pf_xuanqu">
      <div class="tuangouflsy_pf_yinwen">
      <a href="javascript:void(0)" onclick="changeCity('a')" id="city_a_a" class="sekuai">A</a>
      <a href="javascript:void(0)" onclick="changeCity('b')" id="city_a_b" class="sekuai">B</a>
      <a href="javascript:void(0)" onclick="changeCity('c')" id="city_a_c" class="sekuai">C</a>
      <a href="javascript:void(0)" onclick="changeCity('d')" id="city_a_d" class="sekuai">D</a>
      <a href="javascript:void(0)" onclick="changeCity('e')" id="city_a_e" class="sekuai">E</a>
      <a href="javascript:void(0)" onclick="changeCity('f')" id="city_a_f" class="sekuai">F</a>
      <a href="javascript:void(0)" onclick="changeCity('g')" id="city_a_g" class="sekuai">G</a>
      <a href="javascript:void(0)" onclick="changeCity('h')" id="city_a_h" class="sekuai">H</a>
      <a href="javascript:void(0)" onclick="changeCity('j')" id="city_a_j" class="sekuai">J</a>
      <a href="javascript:void(0)" onclick="changeCity('k')" id="city_a_k" class="sekuai">K</a>
      <a href="javascript:void(0)" onclick="changeCity('l')" id="city_a_l" class="sekuai">L</a>
      <a href="javascript:void(0)" onclick="changeCity('m')" id="city_a_m" class="sekuai">M</a>
      <a href="javascript:void(0)" onclick="changeCity('n')" id="city_a_n" class="sekuai">N</a>
      <a href="javascript:void(0)" onclick="changeCity('p')" id="city_a_p" class="sekuai">P</a>
      <a href="javascript:void(0)" onclick="changeCity('q')" id="city_a_q" class="sekuai">Q</a>
      <a href="javascript:void(0)" onclick="changeCity('r')" id="city_a_r" class="sekuai">R</a>
      <a href="javascript:void(0)" onclick="changeCity('s')" id="city_a_s" class="sekuai">S</a>
      <a href="javascript:void(0)" onclick="changeCity('t')" id="city_a_t" class="sekuai">T</a>
      <a href="javascript:void(0)" onclick="changeCity('w')" id="city_a_w" class="sekuai">W</a>
      <a href="javascript:void(0)" onclick="changeCity('x')" id="city_a_x" class="sekuai">X</a>
      <a href="javascript:void(0)" onclick="changeCity('y')" id="city_a_y" class="sekuai">Y</a>
      <a href="javascript:void(0)" onclick="changeCity('z')" id="city_a_z" class="sekuai">Z</a>      
      </div>
      <?php foreach($city_word_arr as $k=>$v){?>
      <div id="city_span_<?=$k?>" class="tuangouflsy_pf_chengshi" >
          <?php foreach($v as $key=>$val){?>
      		<a href="tg<?=$url_head_city_id?><?=$val?><?=$url_end?>" ><?=$city_sort_arr[$val]?></a>
          <?php }?>
      </div>
      <?php }?>
            <div style="clear:both"></div>
   </div>
</div>
       </span>
       <div style="clear:both"></div>
    </div>
</div>
<?php }?>
<div class="searchbox">
<div style="width:525px; text-align:left">
<div class="s-nav">
  <a class="y" id="shangpin" value="输入您想要的宝贝" s="<?=$navheadurl?>list.php" name="q">宝贝</a>
  <a class="n" id="zhanggui" value="输入您想找的掌柜" s="<?=$navheadurl?>shop.php" name="nick">掌柜</a>
  <a class="n" id="shangcheng" value="输入您想要的商城" s="<?=$navheadurl?>malllist.php" name="mall">商城</a>
  <a class="n" id="fenxiang" value="输入您想找的分享" s="<?=$navheadurl?>baobeilist.php" name="key">分享</a>
  <?php if(TGOPEN==1){?>
  <a class="n" id="tuan" value="输入您想要搜的团购" s="<?=$navheadurl?>tg.php" name="keyword">团购</a>  
  <?php }?>
</div>

<div class="clear"></div>
<form class="box" name="formname" method="get" action="<?=$navheadurl?>list.php" style="float:left; " onsubmit="return searchForm()">
  <span class="box-middle"><input name="q" onfocus="this.value='';keyflag=false;" type="text" id="s-txt" class="s-txt" value="输入您想要的宝贝" /><input type="submit" class="sbutton" value="" /></span>
</form>
</div>
</div>
</div>
<div id="nva" >
<div id="tab">
<?php
$sql="select * from ".$BIAOTOU."nav where hide=0 order by sort desc limit 9";
$query=mysql_query($sql);
while($row=mysql_fetch_array($query)){
	if($row['tag']==$tag) $class="class='nowtab'";
	else $class="class='linktab'";
	if($row['target']==0) $target="target='_self'";
	elseif($row['target']==1) $target="target='_blank'";
	$link="<a href='".$row['link']."' ".$target."><span ".$class.">".$row['name']."</span></a>";
    $nav[]=$link;
}

echo $nav_link=implode($nav);
?>              
</div>
<div class="head_bottom"></div>
</div>
</div>