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

<%@ 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 id="Head1" runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Orange/css.css" rel="stylesheet"
        type="text/css" />
    <style type="text/css">
        .chat li
        {
            float: left;
            list-style-type: none;
            height: 30px;
            line-height: 30px;
            vertical-align: middle;
            margin-right: 5px;
        }
        .Tags
        {
            border-style: solid;
            border-width: 0px 0px 0px 0px;
            width: 100%;
        }
        .Tags .bottom
        {
            height: 50px;
            border-left-width: 1px;
        }
        .Tags .bottom div
        {
            line-height: 50px;
            height: 50px;
        }
        .Tag
        {
            border-bottom-width: 1px;
            text-align: left;
            line-height: 24px;
            height: 24px;
            height: 25px;
        }
        .Tag div
        {
            line-height: 24px;
            height: 24px;
        }
        .cTag
        {
            border-width: 1px;
            text-align: left;
            line-height: 24px;
            background-repeat: repeat-x;
            height: 25px;
            border-bottom-width: 0px;
        }
        .cTag li
        {
            list-style-type: none;
            float: left;
            vertical-align: middle;
        }
        .rightbutton
        {
            float: right;
        }
        .rightbutton li
        {
            list-style-type: none;
            float: left;
            height: 20px;
            line-height: 20px;
            border-width: 1px;
            margin: 2px;
            cursor: hand;
        }
        .icotext
        {
            height: 20px;
            line-height: 20px;
            vertical-align: middle;
        }
        .StyleBtn
        {
            color: #474747;
            border-style: dotted;
            border-color: White;
        }
        .CurrentStyleBtn
        {
            font-weight: bold;
            border-color: White;
        }
    </style>

    <script src="../JScript/Cookie.js" type="text/javascript"></script>

    <script type="text/javascript">
        var lasttitle = null;
        function SetTitle() {

            var title = parent.right.window.document.title;
            if (title != lasttitle) {
                if (document.getElementById("divLocation") != null) {
                    document.getElementById("divLocation").innerHTML = title;
                    document.getElementById("divLocation").title = title;
                }
                lasttitle = title;
                //document.body.style.backgroundColor
            }

            //setTimeout('doPostBack() ', 2000);
        }

        function setStyle(index) {
            var styleName = "Blue";
            switch (index) {
                case 0:
                    styleName = "Green";
                    break;
                case 1:
                    styleName = "Blue";
                    break;
                case 2:
                    styleName = "Orange";
                    break;
                case 3:
                    styleName = "Red";
                    break;
            }

            parent.document.getElementById("linkStyle").href = "../Themes/" + styleName + "/css.css";

            for (i = 0; i < parent.frames.length; i++) {
                foundStyle(parent.frames[i], styleName);
                var frame = parent.frames[i];
                for (ii = 0; ii < frame.frames.length; ii++)
                { foundStyle(frame.frames[ii], styleName); }
            }

            var expdate = new Date();
            expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); //1year
            SetCookie("CurrentStyle", styleName, expdate, "/", null, false);
            BtnStyle();
        }

        function foundStyle(frameName, styleName) {
            if (frameName.document.getElementById("linkStyle") != null) {
                frameName.document.getElementById("linkStyle").href = "../Themes/" + styleName + "/css.css";
            }
        }

        function BtnStyle() {
            var cookie = GetCookie("CurrentStyle");
            if (cookie != null) {

                liSpring.className = "StyleBtn";
                liSummer.className = "StyleBtn";
                liAutumn.className = "StyleBtn";
                liWinter.className = "StyleBtn";

                switch (cookie) {
                    case "Green":
                        liSpring.className = "CurrentStyleBtn";
                        break;
                    case "Blue":
                        liSummer.className = "CurrentStyleBtn";
                        break;
                    case "Orange":
                        liAutumn.className = "CurrentStyleBtn";
                        break;
                    case "Red":
                        liWinter.className = "CurrentStyleBtn";
                        break;
                }
            }
        }
        
    </script>

</head>
<body class="bgc2" onload="SetTitle();BtnStyle();" style="margin: 0px;">
    <form id="form1" runat="server">
    <div>
        <table class="Tags" cellspacing="0">
            <tr>
                <td class="Tag" style="width: 20px">
                    <div>
                    </div>
                </td>
                <td class="bgc6 bgimg1 cTag" style="width: 220px;">
                    <ul style="margin: 0px; padding: 0px">
                        <li style="vertical-align: middle; margin-left: 2px; margin-right: 2px" class="ico_page">
                        </li>
                        <li>
                            <div id="divLocation" style="width: 180px; height: 25px; overflow: hidden; white-space: nowrap;
                                text-overflow: ellipsis;">
                                管理首页
                            </div>
                        </li>
                    </ul>
                </td>
                <td class="Tag" style="width: auto">
                    <div class="rightbutton">
                        <ul style="margin: 0px; padding: 0px">
                            <li style="border: 0px">
                                <div style="float: left; margin-left: 5px;" class="ico_home">
                                </div>
                                <div style="float: left" class="icotext">
                                    <a href="ReadMe.aspx" target="right">首页</a></div>
                                <div style="float: left; margin-left: 5px" class="ico_school">
                                </div>
                                <div style="float: left" class="icotext">
                                    校区：</div>
                                <div style="float: left;">
                                    <asp:DropDownList ID="ddlSchool" runat="server" DataTextField="SchoolName" DataValueField="SchoolID"
                                        AutoPostBack="True" OnSelectedIndexChanged="ddlSchool_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                                <div style="float: left; cursor: hand; margin-left: 6px" class="icotext" onmouseover="this.className = 'icotext bgc4';"
                                    onmouseout="this.className = 'icotext';" onclick="richContext(this,divMy)">
                                    我的<span style="font-size: 7px; margin: 2px">▼</span></div>
                                <div style="float: left; cursor: hand; margin-left: 6px" class="icotext" onmouseover="this.className = 'icotext bgc4';"
                                    onmouseout="this.className = 'icotext';" onclick="richContext(this,divTools)">
                                    工具<span style="font-size: 7px; margin: 2px">▼</span></div>
                                <div style="float: left; margin-left: 5px" class="ico_theme">
                                </div>
                            </li>
                            <li id="liSpring" onclick="setStyle(0);">春</li><li id="liSummer" onclick="setStyle(1);">
                                夏</li><li id="liAutumn" onclick="setStyle(2);">秋</li><li id="liWinter" onclick="setStyle(3);">
                                    冬</li>
                            <li style="border: 0px">
                                <div style="float: left; margin-left: 5px;" class="ico_help">
                                </div>
                                <div style="float: left" class="icotext">
                                    <a href="http://www.suwangsoft.com/help/swt2" target="_blank">帮助</a></div>
                            </li>
                            <li style="border: 0px">
                                <div style="float: left; margin-left: 5px;" class="ico_exit">
                                </div>
                                <div style="float: left" class="icotext">
                                    <a href="exit.aspx" target="right">退出</a></div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3" class="bgc6 bottom" style="height: 5px">
                    <div style="height: 5px;">
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <div id="divMy" style="display: none; width: 55px; height: 45px">
        <div style="border: 1px solid #666666; width: 100%; height: 100%">
            <div style="margin: 2px">
                <div onclick="javascript:parent.open('../User/Purview.aspx','right');" style="cursor: hand">
                    我的权限</div>
                <div onclick="javascript:parent.open('../User/Password.aspx','right');" style="cursor: hand">
                    修改密码</div>
            </div>
        </div>
    </div>
    <div id="divTools" style="display: none; width: 55px; height: 45px">
        <div style="border: 1px solid #666666; width: 100%; height: 100%">
            <div style="margin: 2px">
                <div onclick="javascript:void(window.parent.showModelessDialog('../Tools/IDSignIn.aspx', window, 'dialogWidth=800px;dialogHeight=400px'));"
                    style="cursor: hand">
                    ID读卡器</div>
                <div onclick="javascript:void(window.parent.showModelessDialog('../Tools/Jsq.aspx', window, 'dialogWidth=300px;dialogHeight=240px'));"
                    style="cursor: hand">
                    计算器</div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        var oPopup = window.createPopup();
        function richContext(sender, code) {
            var lefter2 = sender.clientTop + sender.clientHeight - 5;
            var topper2 = sender.clientLeft + sender.clientWidth - 6;
            oPopup.document.body.innerHTML = code.innerHTML;
            oPopup.document.body.style.fontSize = '9pt';
            oPopup.document.body.style.lineHeight = '150%';
            oPopup.show(topper2, lefter2, code.style.width.replace("px", ""), code.style.height.replace("px", ""), sender);
        }
    </script>

    </form>
</body>
</html>
<iframe id="SendMsg" width="0" height="0" src="SendMsg.aspx"></iframe>
