<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Left.aspx.cs" Inherits="SWTraining.frame.Left" %>

<%@ Import Namespace="SWTraining" %>
<!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 runat="server">
    <title></title>
    <link id="linkStyle" runat="server" href="../Themes/Orange/css.css" rel="stylesheet"
        type="text/css" />
    <style type="text/css">
        html, body, #form1
        {
            height: 95%;
        }
        .leftNavStyle
        {
            width: 100%;
            text-align: left;
            border-width: 1px;
            line-height: 24px;
            height: 85%;
        }
        .leftNavStyle th
        {
            text-align: left;
        }
        .leftNavStyle .leftTd
        {
            vertical-align: top;
            width: 53px;
            height: 100%;
        }
        .leftNavStyle .rightTd
        {
            vertical-align: top;
            height: 100%;
            border-top-width: 1px;
        }
        #ifWin
        {
            height: 100%;
            width: 100%;
        }
        .leftNavBtnStyle
        {
            margin-left: 2px;
            width: 53px; /*height: 100%;*/
        }
        .leftNavBtnStyle td
        {
            border-style: solid;
            border-width: 0px 1px 0px 0px;
            padding: 2px;
            cursor: pointer;
            cursor: hand;
            height: 26px;
        }
        .leftNavBtnStyle .TdSelected
        {
            border-style: solid;
            border-width: 1px 0px 1px 1px;
            background-repeat: repeat-y;
            padding: 2px;
        }
        .leftNavBtnStyle td li
        {
            list-style-type: none;
            float: left;
        }
        .leftNavBtnStyle td img
        {
            border: 0px;
            margin-right: 1px;
        }
        .mouseover
        {
            border-width: 0px 1px 0px 0px !important;
        }
        .userinfo
        {
            height: 30px;
            margin: 5px;
        }
        .userinfo li
        {
            list-style-type: none;
            float: left;
            padding: 3px;
            line-height: 14px;
        }
        .userface
        {
            background-color: White;
            width: 20px;
            height: 20px;
            border-width: 1px;
        }
        .divfaceCursor
        {
            cursor: pointer;
            cursor: hand;
        }
        .divfaceCursor a
        {
            cursor: pointer;
            cursor: hand;
        }
    </style>

    <script type="text/javascript">


        //选择菜单代码:::::::::::::
        var lastSelected = null;

        function Selected(the, gotoUrl) {
            if (the == lastSelected) {
                //document.getElementById("ifWin").src = gotoUrl;
                Open("ifWin", gotoUrl);
                return;
            }
            var TdSelected = the;
            TdSelected.className = "bgc6 bgimg2 TdSelected";
            if (lastSelected != null) {
                lastSelected.className = "";
            }
            lastSelected = TdSelected;
            //document.getElementById("ifWin").src = gotoUrl;
            Open("ifWin", gotoUrl);
        }

        function mouseover(the) {
            currentClass = the.className;
            if (currentClass == '') the.className = 'bgc4 mouseover';
        }

        function mouseout(the) {
            if (the != lastSelected)
                the.className = currentClass;
        }
        
    </script>

    <script type="text/javascript">

        function Open(frameId, url) {
            var frame = document.getElementById(frameId);
            Loading(frame);
            document.getElementById(frameId).src = url;  //+ "?date=" + new Date().getSeconds();
            void (0);
        }

        function Loading(frame) {

            var offsetLeft = getLeft(frame);
            var offsetTop = getTop(frame);

            var loading = document.getElementById("divLoading");
            loading.style.left = offsetLeft + frame.offsetWidth / 2 - loading.offsetWidth / 2;
            loading.style.top = offsetTop + frame.offsetHeight / 2 - loading.offsetHeight / 2 - 60;
            loading.style.visibility = "visible";
        }

        function Loadend() {
            document.getElementById("divLoading").style.visibility = "hidden";
        }

        function getLeft(obj) {
            var offset = obj.offsetLeft;
            if (obj.offsetParent != null) offset += getLeft(obj.offsetParent);
            return offset;
        };

        function getTop(obj) {
            var offset = obj.offsetTop;
            if (obj.offsetParent != null) offset += getTop(obj.offsetParent);
            return offset;
        };
    
    </script>

</head>
<body class="bgc2" style="margin-right: 0px">
    <form id="form1" runat="server">
    <div id="divLogo" runat="server" style="text-align: center; margin-top: 2px; margin-bottom: 4px">
        <asp:Image ID="imgLogo" runat="server" />
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server" AllowCustomErrorsRedirect="False">
    </asp:ScriptManager>
    <table class="leftNavStyle bgc1 left_panel_bg" cellspacing="0" cellpadding="0">
        <tr>
            <th colspan="2" class="left_panel_titlebg">
                <div class="userinfo">
                    <li class="userface">
                        <iframe frameborder="0" scrolling="no" style="width: 20px; height: 20px" src="Face.aspx">
                        </iframe>
                    </li>
                    <li>
                        <asp:Label ID="labTrueName" runat="server"></asp:Label></li>
                </div>
            </th>
        </tr>
        <tr>
            <td class="leftTd left_panel_line">
                <table class="leftNavBtnStyle" cellspacing="0" cellpadding="0">
                    <tr>
                        <td id="td_1" onclick="Selected(this,'ServiceLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_market"></li>
                                <li>客服</li></ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_2" onclick="Selected(this,'TeacherLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_teacher"></li>
                                <li>教师</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_3" onclick="Selected(this,'AffairsLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_course"></li>
                                <li>教务</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_4" onclick="Selected(this,'FinanceLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_finance"></li>
                                <li>财务</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_5" onclick="Selected(this,'StoreroomLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_storeroom"></li>
                                <li>仓库</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_6" onclick="Selected(this,'PersonnelLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_personnel"></li>
                                <li>人事</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_7" onclick="Selected(this,'PolicyLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_peport"></li>
                                <li>分析</li></ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_8" onclick="Selected(this,'SMSLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_sms"></li>
                                <li>短信</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_10" onclick="Selected(this,'ChatLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_chat"></li>
                                <li>交流</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td id="td_9" onclick="Selected(this,'SystemLeft.aspx')" onmouseover="mouseover(this)"
                            onmouseout="mouseout(this)">
                            <ul style="padding: 0px; margin: 0px">
                                <li class="ico_sys"></li>
                                <li>系统</li>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: auto !important;">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
            <td class="bgc6 rightTd">
                <iframe frameborder="0" scrolling="auto" id="ifWin" name="ifWin" onload="Loadend()">
                </iframe>
                <div id="divLoading" style="visibility: hidden; position: absolute" class="loading">
                </div>
            </td>
        </tr>
    </table>
    <div class="backpanel" style="margin-top: 5px">
        <asp:HyperLink ID="hlkVersion" runat="server" NavigateUrl="../Admin/SystemInfo.aspx"
            Target="right"><%= "Version:" + swq.Version %></asp:HyperLink>
    </div>

    <script type="text/javascript">

        var firstTd = false;
        for (i = 0; i < purviewGroup.length; i++) {
            if (purviewGroup[i] == 0) {
                var td = document.getElementById("td_" + (i + 1));
                if (td != null)
                    td.style.display = "none";
            }
            else {
                if (!firstTd) {
                    var td = document.getElementById("td_" + (i + 1));
                    if (td != null)
                        td.onclick();
                    firstTd = true;
                }
            }
        }
    </script>

    <asp:UpdatePanel ID="uplTime" runat="server">
    </asp:UpdatePanel>
    </form>
</body>
</html>
