<%
    //-----------------------------------------------------------
    // 文件名称: left.aspx
    // 页面名称: 后台左侧菜单
    //
    // 描    述:
    //
    // 创建标识: Add By 吕鑫 2008-05-14
    // 修改标识: Mod By 吕鑫 2008-11-12
    //           修正了菜单打开过慢点击报错并不显示的问题
    //-----------------------------------------------------------
%>
<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.LeftPage, V5Shop.Shop" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>顶部-威博后台管理系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <!--modify by terry 2008-11-12-->
    <script language="javascript">
    function ShowThis(id){
        var MenuList = document.getElementsByTagName("div");
        if(document.getElementById("sort_" + id)){
            if(document.getElementById("sort_" + id).style.display == "none"){
                document.getElementById("sort_" + id).style.display = "block";
                if(document.getElementById("sort_" + id + "_img_1")) document.getElementById("sort_" + id + "_img_1").src = "images/arrow1b.gif";
                if(document.getElementById("sort_" + id + "_img_2")) document.getElementById("sort_" + id + "_img_2").src = "images/minus.gif";
                if(document.getElementById("cate_sort_" + id)) document.getElementById("cate_sort_" + id).className = "cate1b";
            }else{
                document.getElementById("sort_" + id).style.display = "none";
                if(document.getElementById("sort_" + id + "_img_1")) document.getElementById("sort_" + id + "_img_1").src = "images/arrow1.gif";
                if(document.getElementById("sort_" + id + "_img_2")) document.getElementById("sort_" + id + "_img_2").src = "images/plus.gif";
                if(document.getElementById("cate_sort_" + id)) document.getElementById("cate_sort_" + id).className = "cate1";
            }
        }
        
        for(var j = 0 ; j < MenuList.length ; j++){
            if(MenuList[j].className == "sort" && MenuList[j].id != "sort_" + id){
                MenuList[j].style.display = "none";
                if(document.getElementById(MenuList[j].id + "_img_1")) document.getElementById(MenuList[j].id + "_img_1").src = "images/arrow1.gif";
                if(document.getElementById(MenuList[j].id + "_img_2")) document.getElementById(MenuList[j].id + "_img_2").src = "images/plus.gif";
                if(document.getElementById("cate_" + MenuList[j].id)) document.getElementById("cate_" + MenuList[j].id).className = "cate1";
            }
        }
        
        RecordID(id);
    }
    
    function FormatStatus(){
        if(document.getElementById("sort_" + defaultid)){
            document.getElementById("sort_" + defaultid).style.display = "block";
            document.getElementById("sort_" + defaultid + "_img_1").src = "images/arrow1b.gif";
            document.getElementById("sort_" + defaultid + "_img_2").src = "images/minus.gif";
            if(document.getElementById("cate_sort_" + defaultid)) document.getElementById("cate_sort_" + defaultid).className = "cate1b";
        }
    }
    
    function RecordID(id){
        if(document.getElementById("sid")) document.getElementById("sid").value = id;
    }    
    </script>
</head>
<body style="background-color: #F6F9FD;">
    <div style="text-align: center">
        <div>
            <asp:Repeater ID="RepeaterShow" runat="server" OnItemDataBound="ItemBind">
                <ItemTemplate>
                    <center>
                        <div id="cate_sort_<%#Eval("PageID")%>" class="cate1">
                            <div class="cate2">
                                <a href="javascript:ShowThis(<%#Eval("PageID")%>);">
                                    <img id="sort_<%#Eval("PageID")%>_img_1" src="images/arrow1.gif" alt="" /></a> <a href="javascript:ShowThis(<%#Eval("PageID")%>);">
                                        <%#Eval("PageName")%>
                                    </a>
                            </div>
                            <div class="cate3">
                                <a href="javascript:ShowThis(<%#Eval("PageID")%>);">
                                    <img id="sort_<%#Eval("PageID")%>_img_2" src="images/plus.gif" style="cursor: pointer;" alt="" /></a>
                            </div>
                        </div>
                        <div id="sort_<%#Eval("PageID")%>" class="sort" style="display: none;">
                            <ul>
                                <asp:Label ID="ItemID" runat="server" Text='<%#Eval("FirstID")%>' Visible="false"></asp:Label>
                                <asp:Repeater ID="RepeaterShowChild" runat="server">
                                    <ItemTemplate>
                                        <li>
                                            <img src="images/arrow2.gif" style="vertical-align: middle" alt="" />
                                            <a href="<%#Eval("FilePath")%>" target="mainFrame">
                                                <%#Eval("PageName")%>
                                            </a></li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                    </center>
                </ItemTemplate>
            </asp:Repeater>
        </div>
        <div class="kuaijie">
            <!--<a href="Tool_AdminDesktop_Operate.aspx" target="mainFrame"><img src="images/accountent.gif" style="border:0px" alt="" /></a>-->
        </div>
    </div>
    <input type="hidden" id="sid" value="<%=sid %>" />
    <script language="javascript" type="text/javascript">
    var defaultid = <%=sid %>;
    FormatStatus()
    //************************************************************
    RecordID(defaultid);
    </script>
</body>
</html>
