<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClassControlPanel.aspx.cs"
    Inherits="SWTraining.Teacher.ClassControlPanel" Title="班级控制面板" %>

<!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" />

    <script type="text/javascript">


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

        function Selected(the, gotoUrl) {
            if (the == lastSelected) {
                parent.frames[1].location = gotoUrl;
                //                parent.frames["classContent"].src = gotoUrl;
                return;
            }


            var TdSelected = the;
            TdSelected.className = "bgc6 bgimg1 TdSelected";
            if (lastSelected != null) {
                lastSelected.className = "Nav_td";
            }
            lastSelected = TdSelected;
            parent.frames[1].location = gotoUrl;
            //            parent.frames["classContent"].src = gotoUrl; 
        }

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

        function mouseout(the) {
            if (the != lastSelected)
                the.className = currentClass;
        }



        function DefaultSelected() {
            if (lastSelected == null) {
                var pageIndex = Request("PageIndex");
                var action = Request("action");

                if (pageIndex == null) {
                    pageIndex = 0;
                }
                else {
                    pageIndex = eval(pageIndex);
                }

                var theTd = document.getElementById("tdShow" + (pageIndex + 1));

                switch (pageIndex) {
                    case 0:
                        {
                            if (action == "edit")
                                Selected(theTd, 'PostClass.aspx?ClassID=' + ClassID);
                            else
                                theTd.onclick();
                            break;
                        }
                    case 2:
                        {
                            if (action == "attend")
                                Selected(theTd, 'Attend.aspx?ClassID=' + ClassID + '&LessonDegreeID=' + Request("LessonDegreeID"));
                            else
                                theTd.onclick();
                            break;
                        }
                    default:
                        theTd.onclick();
                        break;
                }

            }
        }


        
    </script>

    <style>
        .NavStyle
        {
            width: 100%;
            text-align: left;
            border-width: 0px;
            line-height: 24px;
            height: 85%;
        }
        .NavTitle td
        {
            border-style: solid;
            border-width: 0px 0px 1px 0px;
        }
        .Nav_td
        {
            width: 65px;
            border-style: solid;
            border-width: 0px 0px 1px 0px;
            cursor: pointer;
            cursor: hand;
            height: 26px;
            text-align: center;
        }
        .TdSelected
        {
            width: 65px;
            border-style: solid !important;
            border-width: 1px 1px 0px 1px !important;
            background-repeat: repeat-x !important;
            text-align: center;
            height: 26px;
        }
        td div
        {
            height: 1px;
            font-size: 1px;
            line-height: 1px;
        }
    </style>
</head>
<body onload="DefaultSelected();">
    <form id="form1" runat="server">
    <div>
        <table class="NavStyle" cellspacing="0">
            <tr class="bgc2">
                <td colspan="10" style="height: 4px; border-width: 1px 1px 0px 1px;">
                    <div>
                    </div>
                </td>
            </tr>
            <tr class="NavTitle bgc2">
                <td style="width: 20px; border-width: 0px 0px 1px 1px;">
                    &nbsp;
                </td>
                <td id="tdShow1" class="Nav_td" onclick="Selected(this,'Class.aspx?ClassID='+ClassID)"
                    onmouseover="mouseover(this)" onmouseout="mouseout(this)">
                    基本信息
                </td>
                <td id="tdShow2" class="Nav_td" onclick="Selected(this,'ClassStudents.aspx?ClassID='+ClassID)"
                    onmouseover="mouseover(this)" onmouseout="mouseout(this)">
                    班级学员
                </td>
                <td id="tdShow3" class="Nav_td" onclick="Selected(this,'LessonDegree.aspx?ClassID='+ClassID)"
                    onmouseover="mouseover(this)" onmouseout="mouseout(this)">
                    排课上课
                </td>
                <td style="border-width: 0px 1px 1px 0px;">
                    <asp:HyperLink ID="hlkUp" runat="server" NavigateUrl='<%#string.Format("javascript:parent.location = url;void(0)") %>'
                        ImageUrl='<%#accTheme("up.gif") %>' />
                </td>
            </tr>
            <tr>
                <td colspan="10" class="bgc6" style="height: 2px; border-width: 0px 1px 1px 1px;">
                    <div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
