
<!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>
<title>刀客建站系统   Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/general.css" rel="stylesheet" type="text/css" />

<style type="text/css">
html {
scrollbar-face-color:#e9e7e4;
scrollbar-highlight-color:#fff;  
scrollbar-shadow-color:#cecdc7;  
scrollbar-3dlight-color:#eae9e5;  
scrollbar-arrow-color:#847949;  
scrollbar-track-color:#fafaf8;  
scrollbar-darkshadow-color:#fff;
}
body {
background: #f7f7f5 url(images/frame-left.gif) repeat-y right 0;
}
#tabbar-div {
	display:none;
  background: #278296;
  padding-left: 10px;
  height: 21px;
  padding-top: 0px;
}
#tabbar-div p {
  margin: 1px 0 0 0;
}
a.fix-submenu{clear:both; margin-left:5px; padding:1px 5px; *padding:3px 5px 5px;  color:#278296;background:#FFF;}
a.fix-submenu:hover{padding:1px 5px; *padding:3px 5px 5px;  color:#278296;background:#DDEEF2;}
.tab-front {
  background: #80BDCB;
  line-height: 20px;
  font-weight: bold;
  padding: 4px 15px 4px 18px;
  border-right: 2px solid #335b64;
  cursor: hand;
  cursor: pointer;
}
.tab-back {
  color: #F4FAFB;
  line-height: 20px;
  padding: 4px 15px 4px 18px;
  cursor: hand;
  cursor: pointer;
}
.tab-hover {
  color: #F4FAFB;
  line-height: 20px;
  padding: 4px 15px 4px 18px;
  cursor: hand;
  cursor: pointer;
  background: #2F9DB5;
}
#top-div
{
  padding: 3px 0 2px;
  background: #BBDDE5;
  margin: 5px;
  text-align: center;
}
#main-div {
  /*border: 1px solid #345C65;*/
  padding: 5px;
  /*margin: 5px;
  background: #FFF;*/
}
#menu-list {
  padding: 0;
  margin: 0;
}
#menu-list ul {
  padding: 0;
  margin: 0;
  list-style-type: none;
  color: #335B64;
}
#menu-list ul li {margin-bottom:6px;}
#menu-list ul li ul { padding:5px 0 2px 27px;;}
#menu-list ul li ul li {margin-bottom:0;padding:4px 0;}

.navItem {
  margin:0;
  padding:0;
  font-size:12px;
  border-width:1px;
  border-style:solid;
  padding-left:27px;
  line-height: 25px;
  min-height:25px;
  _height:25px;
  cursor: hand;
  cursor: pointer;
  font-weight: 700;
  position:relative;
}


#main-div a:visited, #menu-list a:link, #menu-list a:hover {
  color: #335B64
  text-decoration: none;
}
#menu-list a:active {
  color: #EB8A3D;
}
.explode {
  /*background: url(images/menu_minus.gif) no-repeat 0px 3px;*/
  font-weight: bold;
  border-color:#a5d11f;
  background-color:#f4fbe1;
  color:#395500;
}
.collapse {
  /*background: url(images/menu_plus.gif) no-repeat 0px 3px;*/
  color:#78674f;
  border-color:#cac8bb;
  background-color:#f1f1ee;
}
.menuOver,#li_0.explode {color:#000; background-color:#ecf4fd; border-color:#98c7f5}

.btn-showMore {display:inline-block;text-indent:-99em;overflow:hidden;width:9px;height:9px;position:absolute;right:6px;top:8px; background-repeat:no-repeat}

.collapse .btn-showMore {background-image:url(images/00-19.gif);}
.menuOver .btn-showMore {background-image: url(images/menu_plus.gif);}
.explode .btn-showMore { background-image:url(images/menu_minus.gif);}

#li_0.menuOver .btn-showMore,#li_0.explode .btn-showMore{background-image: url(images/00-20.gif)}
#li_0.collapse { color:#78674f}

.menu-item {
  /*background: url(images/menu_arrow.gif) no-repeat 0px 3px;*/
  font-weight: 400;
}
.menu-item-focus{background:url(images/00-0.gif) no-repeat 170px center; font-weight:700; text-decoration:underline;}
.menu-item a,.menu-item-focus a {color:#4e4e4e;}
.menu-item-focus a {text-decoration:underline;}
#help-title {
  font-size: 14px;
  color: #000080;
  margin: 5px 0;
  padding: 0px;
}
#help-content {
  margin: 0;
  padding: 0;
}
.tips {
  color: #CC0000;
}
.link {
  color: #000099;
}
#li_0,<%{foreach from=$out.left_tree_arr item=v key=k name=f_a}%>#li_<%{$smarty.foreach.f_a.iteration}%><%{if $smarty.foreach.f_a.last!=true}%>,<%{/if}%><%{/foreach}%> {
	display:block;
	background-position:6px 4px;
	background-repeat:no-repeat;
	margin:0;
	padding:0;
	font-size:12px;
	border-width:1px;
	border-style:solid;
	padding-left:27px;
	line-height: 25px;
	min-height:25px;
	_height:25px;
	cursor: hand;
	cursor: pointer;
	font-weight: 700;
	position:relative;
}
#li_0 {background-image: url(images/00-1.gif)}
<%{foreach from=$out.left_tree_arr item=v key=k name=f_a}%>
#li_<%{$smarty.foreach.f_a.iteration}%> {background-image: url(<%{$v.icon_url}%>)}
<%{/foreach}%>
</style>

</head>
<body>
<div id="tabbar-div">
<p><span style="float:right; padding: 3px 5px;" ><a href="javascript:all_on_off();"><img id="toggleImg" src="images/menu_plus.gif" width="9" height="9" border="0" alt="Close" /></a></span>

<span class="tab-front" id="menu-tab">Menu</span><span class="tab-back" id="help-tab">Help</span>

</p>
</div>
<div id="main-div">
<div id="menu-list">
<ul>
	<li name="menu"><a href="index.php?act=index.default_page" class="explode" id='li_0' target="main-frame"  onclick='ul_on_off(this)' onmouseover="menuOver(this)" onmouseout="menuOut(this)" target="main-frame">管理中心主页<span class="btn-showMore"></span></a></li>
	<%{foreach from=$out.left_tree_arr item=v key=k name=f_a}%>
    <li name="menu">
    <h3 class="collapse" id='li_<%{$smarty.foreach.f_a.iteration}%>' onclick='ul_on_off(this)' onmouseover="menuOver(this)" onmouseout="menuOut(this)">	<%{$k|escape:html}%><span class="btn-showMore"></span></h3>
        <ul id='li_<%{$smarty.foreach.f_a.iteration}%>_ul' style='display:none' >	 
  			  <%{foreach from=$v key=k_1 item=v_1}%> 
   				<%{if $k_1!='icon_url'}%> 	
			  		<li class="menu-item" ><a href="<%{$v_1}%>" onclick='no_on_off(this)'  target="main-frame"><%{$k_1|escape:html}%></a></li>
					<%{/if}%>	
				<%{/foreach}%>
		  </ul>
	</li>
 	<%{/foreach}%>  
</ul>

</div>
<div id="help-div" style="display:none">

<h1 id="help-title"></h1>
<div id="help-content"></div>
</div>
</div>
<a class="fix-submenu" target="_top"  href="index.php?act=login.logout">退出</a>
<script type="text/javascript" src="js/jquery.js"></script>
<script language="JavaScript">
$(document).ready(function(){
});
function ul_on_off(obj){
	/*if(no_on_off_act){
		no_on_off_act	=	false;
		return;
	}*/
		var id = obj.id;
		var ul_id = id+'_ul';
		if(id=="li_0"){obj.className = "explode";hiddenStyle();return}
		
		if(obj.className != 'explode'){
			$("#"+ul_id).slideDown('fast',function(){
				obj.className = 'explode';							  
			})
		}else{
			$("#"+ul_id).slideUp('fast',function(){
				obj.className = 'collapse';	
			})
		}
}

/*function ul_on_off(obj){
	//if(no_on_off_act){
		//no_on_off_act	=	false;
		//return;
	//}
		var id		=	obj.id;
		var ul_id	=	id+'_ul';
		if(id=="li_0"){obj.className = "explode";hiddenStyle();return}
		
		if($("#"+ul_id).css("display")!='none'){
			$("#"+ul_id).css({display:"none"});
			obj.className = 'collapse';
		}else{
			$("#"+ul_id).css({display:"block"});
			obj.className = 'explode';
		}
}*/
function menuOver(e){
	if(e.className == "collapse"){
		e.className += " menuOver";
	}
}
function menuOut(e){
	if(e.className.indexOf("menuOver") > -1){
		e.className = "collapse";
	}
}
function all_on_off()
{
	if($("#toggleImg")[0].src.match('.*?images/menu_plus.gif')){
		$("ul").each(function(){
			if($(this)[0].id.match(/li_[0-9]+_ul/)){
				$(this).css({
					display	:	"block"			
				});		
			}
		});
	$("#toggleImg")[0].src='images/menu_minus.gif';
	}else{
		$("ul").each(function(){
			if($(this)[0].id.match(/li_[0-9]+_ul/)){
				$(this).css({
					display	:	"none"			
				});		
			}
		});	
		$("#toggleImg")[0].src='images/menu_plus.gif';
	}
}
var no_on_off_act	=	false;
function no_on_off(e){
	if($('#li_0').attr('class') == 'explode'){$('#li_0').attr('class','collapse')}
	hiddenStyle()
	e.parentNode.className = "menu-item-focus";
	//no_on_off_act	=	true;
}
function hiddenStyle(){
	for(var i=1;i<6;i++){
		var n = "li_"+i+"_ul";
		var m = document.getElementById(n).getElementsByTagName("LI");
		for(var j=0;j<m.length;j++){
			if(m[j].className == "menu-item-focus"){
				m[j].className = "menu-item";
			}
		}
	}	
}

</script>

</body>
</html>

