<%@ 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" style="height: 100%; margin: 0px; padding: 0px;">
<head id="Head1" runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Blue/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: pointer;
            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;
        }
        
        #divIframe
        {
            _height: expression(document.documentElement.clientHeight-33+"px");
        }
    </style>
    <script src="../JScript/Cookie.js" type="text/javascript"></script>
    <script src="../JScript/Loading.js" type="text/javascript"></script>
    <script type="text/javascript">
        var lasttitle = null;
        function SetTitle() {
            try {
                //var title = parent.right.window.document.title;
                var title = right.window.document.title;
                if (title != lasttitle) {
                    if (document.getElementById("divLocation") != null) {
                        document.getElementById("divLocation").innerHTML = title;
                        document.getElementById("divLocation").title = title;
                    }
                    lasttitle = title;
                }
            } catch (ex) { }

            try {
//                alert(this.parent.frames["left"].frames["iFace"].window.document.title);
                this.parent.frames["left"].frames["iFace"].window.stopTimer();
            } catch (ex) { }
        }

        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 _frame = frame.frames[ii];
                    for (iii = 0; iii < _frame.frames.length; iii++)
                    { foundStyle(_frame.frames[iii], 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;
                }
            }
        }

        function GetStyle(obj) {
            var cookie = GetCookie("CurrentStyle");
            var id = obj.id;
            var returnValue = false;

            if (cookie != null) {

                switch (cookie) {
                    case "Green":
                        if (id == 'liSpring')
                            returnValue = true;
                        break;
                    case "Blue":
                        if (id == 'liSummer')
                            returnValue = true;
                        break;
                    case "Orange":
                        if (id == 'liAutumn')
                            returnValue = true;
                        break;
                    case "Red":
                        if (id == 'liWinter')
                            returnValue = true;
                        break;
                }
            }

            return returnValue;
        }

        function StyleOver(obj) {
            if (GetStyle(obj))
                obj.className = 'CurrentStyleBtn bgc4';
            else
                obj.className = 'StyleBtn bgc4';
        }

        function StyleOut(obj) {
            if (GetStyle(obj))
                obj.className = 'CurrentStyleBtn';
            else
                obj.className = 'StyleBtn';
        }
        
    </script>
    <script type="text/javascript">

        function richContext(sender, code) {
            oPopup.document.body.innerHTML = code.innerHTML;
            oPopup.document.body.style.fontSize = '9pt';
            oPopup.document.body.style.lineHeight = '120%';
            oPopup.document.body.style.backgroundColor = '#ffffff';

            var obj = sender;
            var x = getLeft(obj) + obj.offsetWidth - 5;
            var y = getTop(obj) + obj.offsetHeight - 3;

            divPopup.style.left = x + 'px';
            divPopup.style.top = y + 'px';
            divPopup.style.visibility = "visible";
        }


        function getTop(e) {
            var t = e.offsetTop
            while (e = e.offsetParent) t += e.offsetTop;
            return t;
        }

        function getLeft(e) {
            var l = e.offsetLeft
            while (e = e.offsetParent) l += e.offsetLeft;
            return l;
        }

        function closedivPopup() {
            divPopup.style.visibility = "hidden";
        }

        function OnFrameLoad(sender) {
            try {
                if (___isie6) {
                    iframes.style.position = "relative";
                    document.frames[sender.name].window.document.body.scroll = 'yes';
                }
            } catch (ex)
                { }
        }

        function ChangeIE6Css() {
            try {
                if (!___isie6) {
                    document.getElementById("tdSubjectBg").className = "Tag subject_bg";
                }
            } catch (ex)
                { }
        }

    </script>
</head>
<body class="bgc2" onload="BtnStyle();ChangeIE6Css();" style="margin: 0px; padding: 0px;
    height: 100%">
    <form id="form1" runat="server" style="height: 100%; margin: 0px; padding: 0px">
    <div id="divMy" style="display: none; visibility: hidden; width: 55px; height: 45px;
        background-color: #ffffff">
        <div style="border: 0px solid #666666; width: 100%; height: 100%; padding: 0px; margin: 0px;">
            <div style="padding: 0px; margin: 0px">
                <div onclick="javascript:parent.open('../User/Purview.aspx','right');" style="cursor: pointer;
                    cursor: hand; padding: 0px; margin: 0px;">
                    我的权限</div>
                <div onclick="javascript:parent.open('../User/Password.aspx','right');" style="cursor: pointer;
                    cursor: hand; padding: 0px; margin: 0px;">
                    修改密码</div>
            </div>
        </div>
    </div>
    <div id="divTools" style="display: none; visibility: hidden; width: 55px; height: 45px;
        background-color: #ffffff">
        <div style="border: 0px solid #666666; width: 100%; height: 100%; padding: 0px; margin: 0px;">
            <div style="padding: 0px; margin: 0px">
                <div onclick="javascript:void(parent.window.open('../Tools/IDSignIn.aspx', 'window_id',' width=800,height=400,scrollbars=yes,resizable=yes'));"
                    style="cursor: pointer; cursor: hand; padding: 0px; margin: 0px;">
                    ID读卡器</div>
                <div onclick="javascript:void(parent.window.open('../Tools/Jsq.aspx', 'window_jsq', ' width=380,height=200,scrollbars=yes,resizable=yes'));"
                    style="cursor: pointer; cursor: hand; padding: 0px; margin: 0px;">
                    计算器</div>
            </div>
        </div>
    </div>
    <div id="divPopup" style="position: absolute; width: 70px; height: 65px; visibility: hidden;
        visibility: hidden; z-index: 1000; padding: 0px; margin: 0px; border-width: 1px;
        border-color: #c0c0c0">
        <iframe style="width: 100%; height: 100%; padding: 0px; margin: 0px;" id="oPopup"
            onmouseout="closedivPopup()" name="oPopup" frameborder="0" scrolling="no"></iframe>
    </div>
    <div style="height: 33px" class="bgc_title">
        <table class="Tags border_c_title" cellspacing="0">
            <tr>
                <td class="Tag" style="width: 20px">
                    <div>
                    </div>
                </td>
                <td class="bgc6 bgimg1 cTag" style="width: 200px;">
                    <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: 160px; height: 25px; overflow: hidden; white-space: nowrap;
                                text-overflow: ellipsis;">
                                管理首页
                            </div>
                        </li>
                    </ul>
                </td>
                <td id="tdSubjectBg" class="Tag" style="width: auto">
                    <div class="rightbutton" style="white-space: nowrap; position:absolute; z-index:0; top:0px; right:5px;">
                        <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" onmouseover="this.className = 'icotext bgc4';"
                                    onmouseout="this.className = '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" Width="100px" runat="server" DataTextField="SchoolName" DataValueField="SchoolID"
                                        AutoPostBack="True" OnSelectedIndexChanged="ddlSchool_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                                <div style="float: left; cursor: pointer; 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: pointer; 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>
                            </li>
                            <li style="border: 0px">
                                <div style="float: left; margin-left: 5px" class="ico_theme">
                                </div>
                            </li>
                            <li id="liSpring" onclick="setStyle(0);" class="StyleBtn" onmouseover="StyleOver(this)"
                                onmouseout="StyleOut(this)">春</li>
                            <li id="liSummer" onclick="setStyle(1);" class="StyleBtn" onmouseover="StyleOver(this)"
                                onmouseout="StyleOut(this)">夏</li>
                            <li id="liAutumn" onclick="setStyle(2);" class="StyleBtn" onmouseover="StyleOver(this)"
                                onmouseout="StyleOut(this)">秋</li>
                            <li id="liWinter" onclick="setStyle(3);" class="StyleBtn" onmouseover="StyleOver(this)"
                                onmouseout="StyleOut(this)">冬</li>
                            <li style="border: 0px">
                                <div style="float: left; margin-left: 5px;" class="ico_help">
                                </div>
                                <div style="float: left" class="icotext" onmouseover="this.className = 'icotext bgc4';"
                                    onmouseout="this.className = 'icotext';">
                                    <asp:HyperLink ID="hlkHelp" Target="_blank" runat="server">帮助</asp:HyperLink></div>
                            </li>
                            <li style="border: 0px">
                                <div style="float: left; margin-left: 5px;" class="ico_exit">
                                </div>
                                <div style="float: left" class="icotext" onmouseover="this.className = 'icotext bgc4';"
                                    onmouseout="this.className = 'icotext';">
                                    <a href="exit.aspx" target="right">退出</a></div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3" class="bgc6 bottom" style="height: 3px">
                    <div style="height: 3px;">
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <div id="divIframe" style="position: absolute; left: 0px; right: 0px; top: 33px;
        bottom: 0px; overflow: hidden; padding: 0px; margin: 0px; border-width: 1px;
        border-bottom-width: 0px; border-right-width: 0px" class="borderc1">
        <div id="iframes" style="position: absolute; padding: 0px; margin: 0px; width: 100%;
            height: 100%; overflow: hidden;">
            <iframe id="right" name="right" onreadystatechange="Loading(this)" onload="Loadend();SetTitle();OnFrameLoad(this);"
                frameborder="0" style="height: 100%; width: 100%; border-width: 0px; margin: 0px;
                padding: 0px" src="readme.aspx"></iframe>
        </div>
        <div id="divLoading" style="visibility: hidden; position: absolute" class="loading">
        </div>
    </div>
    </form>
    <iframe id="SendMsg" width="0" height="0" src="SendMsg.aspx"></iframe>
</body>
</html>
