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

<%@ 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: 0px;
        }
        .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" style="height: 60px">
            <tr>
                <td class="Tag" style="width: 20px">
                    <div>
                    </div>
                </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="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="exit">
                                </div>
                                <div style="float: left" class="icotext">
                                    <a href="exit.aspx" target="right">退出</a></div>
                            </li>
                        </ul>
                    </div>
                    <img alt="" src="../Images/stusearch.png" />
                </td>
            </tr>
            <tr>
                <td colspan="3" class="bgc6 bottom" style="height: 5px">
                    <div style="height: 5px;">
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
