<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResultExam.aspx.cs" Inherits="RM.Web.Training.Exam.ResultExam" %>

<!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><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ResultExam_Title")%></title>
    <link href="Themes/Css/ExamGlobal.css" rel="stylesheet" type="text/css" />
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <link href="Themes/Css/ExaminationCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Training/Learn/m/ckplayer/ckplayer.js" charset="utf-8"></script>
    <script src="/Live/swfobject.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jQuery.path2html.js" type="text/javascript"></script>
    <style type="text/css">
    .activeQuetion .ques_Context{ display:block;}
    .exam_Title input{ width:100px;}
    </style>
    <script type="text/javascript">
        $(function () {
            $(".exam_result>li,.exam_result>li>label,.exam_result>li>input").hover(function () { $(this).css("cursor", "default"); }, function () { });
            $("input[type=checkbox],input[type=radio],input[type=text],textarea").attr("disabled", "disabled"); //把答题锁住
           
            //把经常变换的对象预留出来
            var $currQueCount = $("#currQueCount"); //答题情况
            var $exam_Num = $("#exam_Num"); //题目编号
            var $list = $(".ques_Context"); //题目对象
            var $linkList = $(".curr_State>li>a"); //右侧题目编号列表
            var $pageBody = $("body"); //body对象
            var $examItem = $("#examItem"); //左侧题目对象
            if (!$list || $list.length < 1 || !$linkList || $linkList.length < 1) {//页面有错误
                return;
            }
            $list.first().addClass("activeQuetion");
            $linkList.first().addClass("currLinkNum");

            //自适应宽高
            function changePageWindow() {
                if ($pageBody.height() < $("#toolBar").height()) //右侧工具栏自适应高度
                    $("#toolBar").css("overflow", "scroll");
                else
                    $("#toolBar").css("overflow", "auto");
                $("#toolBar").height($pageBody.height());
                $examItem.width($pageBody.width() - 290); //左侧题目自适应高度
                changePageHeight();
            }
            //每次题目改变根据题目的高度自适应高度
            function changePageHeight() {
                if ($examItem.height() > $pageBody.height()) {
                    $examItem.css("overflow", "scroll");
                } else {
                    $examItem.css("overflow", "auto");
                }
                $examItem.height($pageBody.height() - 100);
            }
            changePageWindow();
            $(window).resize(changePageWindow); //绑定系统宽高改变事件
            $("#upQuestion").click(function () {//上一题
                var $tempObj = $(".activeQuetion");
                var $tempNumObj = $(".currLinkNum");
                if ($tempObj.prev().length < 1) {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_mysyt")%>", 2000, 3);
                } else {
                    $tempObj.removeClass("activeQuetion").prev().addClass("activeQuetion");
                    $tempNumObj.removeClass("currLinkNum").prev().addClass("currLinkNum");
                }
            });
            $("#nextQuesion").click(function () {//下一题
                var $tempObj = $(".activeQuetion");
                var $tempNumObj = $(".currLinkNum");
                if ($tempObj.next().length < 1) {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_myxyt")%>", 2000, 3);
                } else {
                    $tempObj.removeClass("activeQuetion").next().addClass("activeQuetion");
                    $tempNumObj.removeClass("currLinkNum").next().addClass("currLinkNum");
                }
            });
            $linkList.click(function () { //右侧题目列表
                $("#btnContainer").show();
                qh = false;
                $(".activeQuetion").removeClass("activeQuetion");
                $(".currLinkNum").removeClass("currLinkNum");
                $(this).addClass("currLinkNum");
                $list.eq(parseInt($(this).text()) - 1).addClass("activeQuetion");
            });
        });
        var qh = false;
        function qiehuan() {
            var $list = $(".ques_Context"); //题目对象
            var $linkList = $(".curr_State>li>a"); //右侧题目编号列表
            if ($list.length > 0) {//页面有错误
                for (var i = 0; i < $list.length; i++) {
                    if (qh == false) {
                        $list.addClass("ques_Context activeQuetion");
                    }
                    if (qh == true) {
                        $list.removeClass("activeQuetion");
                    }
                }
                if (qh == true) {
                    $list.first().addClass("activeQuetion");
                    $("#btnContainer").show();
                    qh = false;
                } else {
                    qh = true;
                    $("#btnContainer").hide();
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div runat="server" id="ExaminationPaperTitle">
        </div>
    </div>

    <div id="container">
        <div id="examItem">
            <div id="ei_Container">
                <div class="examContext">
                    <%=QuestionHtml.ToString() %>
                </div>
            </div>
            <div id="btnContainer">
                <input type="button" value="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_syt")%>" id="upQuestion" />
                <input type="button" value="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_xyt")%>" id="nextQuesion" />
            </div>
            <div class="promptContext">
            </div>
        </div>
        <div id="toolBar">
            <div id="currStateInfo">
                <fieldset id="er_Container">
                    <legend><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ExamStatisticsList_xycjtj")%></legend>
                    <ul id="er_List">
                        <li><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Name")%>：<span id="txtStuName" runat="server"></span> </li>
                        <li><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Report_def")%>：<span id="txtScore" runat="server">0</span> </li>
                        <li style=" display:none;"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_dqzql")%>：<span id="txtAccuracy" runat="server">0</span></li>
                        <li><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Report_sftg")%>：<span id="txtIsThrough" runat="server"></span></li>
                    </ul>
                </fieldset>
                <div class="ans_State">&nbsp;<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_CountExam")%>  &nbsp;<a class="button green"  onclick="javascript:qiehuan();" title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_qhstckxs")%>" ><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_stxsdtlb")%> </a></div>
                <div id="ans_State" style=" display:none;">
                    <label id="sumQueCount">
                        <%=SumCount %></label></div>
                <ul class="curr_State">
                    <li>
                        <%=LinkStateHtml.ToString() %>
                    </li>
                </ul>
                <div class="promptContext">
                    <label class="asterisk">
                        *
                    </label>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_zcxyhddxxxs")%><span style="background-color: #FBD8D8;"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_Lightred")%></span>
                    <br />
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_ycxyhdcwdtxhxs")%>：<span style="background-color: #008000; color: White;"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_red")%></span></div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
    </form>
    
        <script type="text/javascript">
            var i = 0;
            $(".annex").each(function () {
                $(this).attr("id", "aa" + i);
                var fileUrl = $(this).html(); // text();
                window.path2html("aa" + i, fileUrl);
                i++;
            });
            var j = 0;
            $("annex").each(function () {
                $(this).attr("id", "aa" + j);
                var fileUrl = $(this).text();
                window.path2html("aa" + j, fileUrl);
                j++;
            });


            $("img").each(function (i) {
                var imgsrc = $(this).attr("src");
                if (imgsrc.indexOf("image") < 0 && imgsrc.indexOf("/Resources/SharesFiles") < 0 && imgsrc.indexOf("/Resources/ExamImportWord") < 0) {
                    $(this).attr("src", "/Resources/ExamImportWord/" + imgsrc);
                    imgsrc = "/Resources/ExamImportWord/" + imgsrc;
                }
            });

            $("a[rel^='colorbox']").colorbox(
{ title: " ", slideshow: true, slideshowAuto: false, previous: "上一张", next: "下一张", close: "关闭", slideshowStart: "播放", slideshowStop: "暂停", current: "第 {current} 张 (共{total}张)" });     
     
    </script>
</body>
</html>
