<?php
function PrintMenu($pars)
 {
?>
<LINK href="css/niutuku.css" type=text/css rel=stylesheet>

<DIV class=pnav-cnt>


    <?php
      $sr = mysql_query("select * from `web_menu` where bid=".$pars["bid"]." and sid=0 and tid=0 and view=1 order by sort asc");
	  while ($srs = mysql_fetch_array($sr))
	   {
	?>
	<DIV class=pnav-box id=letter-a>
      <DIV class=box-title>
      <A class="btn-fold hidden " href="#"></A><A class="btn-unfold " href="#"></A>
      <SPAN class=pnav-letter><a href="<?php echo $srs["showfile"];?>?bid=<?php echo $srs["bid"];?>&sid=<?php echo $srs["sid"];?>&tid=<?php echo $srs["tid"];?>&fid=<?php echo $srs["id"];?>"><?php echo $srs["name"];?></a></SPAN>
      </DIV>
        
	    <?php
          $tr = mysql_query("select * from `web_menu` where bid=".$pars["bid"]." and sid=".$srs["id"]." and view=1 and tid=0 order by sort asc");
		  $row = mysql_num_rows($tr);
          if ($row !=0)
		   {
			   echo "<UL class=\"box-list \">";
			 while ($trs = mysql_fetch_array($tr)) 
			  {
	    ?>
      
	  <LI><A class="btn-fold hidden" href="#"></A><A class="btn-unfold " href="#"></A>
      <B><?php echo $trs["name"];?> </B> 
                  <?php
               $fr = mysql_query("select * from `web_menu` where bid=".$pars["bid"]." and sid=".$srs["id"]." and view=1 and tid=".$trs["id"]." order by sort asc");  
				   while ($frs = mysql_fetch_array($fr)) 
		            {
			      ?>
	           <H2 ><A href="<?php echo $frs["showfile"];?>?bid=<?php echo $frs["bid"]?>&sid=<?php echo $frs["sid"];?>&tid=<?php echo $frs["tid"];?>&fid=<?php echo $frs["id"];?>" ><?php echo $frs["name"];?></A></H2>
                   <?php
			         }
			       ?>   
	  </LI>
      
         <?php
			  }
			  echo "</UL>";
		   }
		 ?>
         
    </DIV> 
    <?php
			
	   }
	?>
         

<SCRIPT src="js/niutuku.js" type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[ 
(function(){
NTES("span.photo-search input[type=text]").addEvent("focus", function(){ this.value == this.defaultValue && (this.value = ""); }).addEvent("blur", function(){ this.value == "" && (this.value = this.defaultValue); });
	NTES("div.pnav-box div.box-title a.btn-fold").addEvent("click", function(e){
		e.preventDefault();
		var eleTitle = NTES(this.parentNode);
		NTES(this).addCss("hidden");
		eleTitle.$("a.btn-unfold").removeCss("hidden");
		NTES(eleTitle.parentNode).$("ul.box-list").removeCss("hidden");
	});
	NTES("div.pnav-box div.box-title a.btn-unfold").addEvent("click", function(e){
		e.preventDefault();
		var eleTitle = NTES(this.parentNode);
		NTES(this).addCss("hidden");
		eleTitle.$("a.btn-fold").removeCss("hidden");
		NTES(eleTitle.parentNode).$("ul.box-list").addCss("hidden");
	});
	NTES("div.pnav-box ul.box-list a.btn-fold").addEvent("click", function(e){
		e.preventDefault();
		var eleTitle = NTES(this.parentNode);
		NTES(this).addCss("hidden");
		eleTitle.$("a.btn-unfold").removeCss("hidden");
		eleTitle.$("h2").removeCss("hidden");
	});
	NTES("div.pnav-box ul.box-list a.btn-unfold").addEvent("click", function(e){
		e.preventDefault();
		var eleTitle = NTES(this.parentNode);
		NTES(this).addCss("hidden");
		eleTitle.$("a.btn-fold").removeCss("hidden");
		eleTitle.$("h2").addCss("hidden");
	});
	new NTES.ui.Slide(NTES("ul.photo-snav li"), NTES("div.photo-scnt"), "active", "mouseover", 6000);
})();
//]]> 
</SCRIPT>
</DIV>

<?php
 }
 if ($_GET["bid"] != 0)
   {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #a1d0ec;">
  <tr>
    <td height="70" >
	<img src="images/appimages/left_1.jpg" width="224" height="70" />
<?php # Sublm($pars["bid"],1); ?></td>
  </tr>
  <tr>
    <td colspan="2"><?php PrintMenu($pars);?></td>
  </tr>
</table>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
 <?php
   }
 ?>


 <table width="100%" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td>
    <a href="EMS_Content.php?fid=27&bid=0&sid=0&tid=0"><img src="images/appimages/connect.jpg" width="228" height="70" border="0" /></a></td>
  </tr>
</table>

