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

<!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("Examination_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.3.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>
    <link href="/Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />


    <style type="text/css">
        /*.ques_Context  { float: none; clear: both; width: 100%; }
        .exam_result li { float: left; }
        .exam_result li img { width: 80%; max-width: 300px; }
        .exam_result li lable{ float: left; }*/
       
        .activeQuetion .ques_Context { display: block; }
        .activeQuetion2 .ques_Context { display: block; }
        .exam_Title input { width: 100px; }
        #face { position: fixed; bottom: 0px; right: 200px; height: 270px; border: 1px solid #ccc; width: 220px; }
        .ulcss ul { list-style: none; margin-right: 20px; text-align: right; }
        .ulcss li { float: left; margin-left: 20px; width: 100px; font-size: 18px; }
        .menu a { font-size: 18px; padding-right: 40px; font-weight: 100; color: #a5a5a5; }
        #Header { background: #FFFFFF; width: 98%; padding: 0 1%; margin: 0 auto; height: 95px; overflow: hidden; border-bottom: 1px #e5e5e5 solid; }
        .Learn_Left { width: 186px; position: absolute; left: 0; top: 96px; background-color: #f4f4f4; border-right: 1px #e5e5e5 solid; }
        .Learn_Left_shipin { width: 172px; margin: 0 auto; background: #fff; border: 1px #e5e5e5 solid; height: 155px; padding: 5px; text-align: center; }
        .zhangjie { margin: 8px; }
        .zhangjie li { background-image: url(/pic/zhangjie_dian.gif); background-repeat: no-repeat; padding-left: 20px; }
        .zhangjie li ul { border-left: 3px #e5e5e5 solid; margin-left: -12px; }
        .zhangjie li ul li { background-image: url(); padding-left: 25px; }
        .Learn_Right { width: 186px; position: absolute; right: 0; top: 96px; background-color: #f4f4f4; border-left: 1px #e5e5e5 solid; }
        .learn_chat { margin: 10px; }
        .learn_chat span { color: Blue; }
        .learn_chat_input { position: absolute; bottom: 0; padding: 5px; text-align: right; }
        .Learn_Center { padding-left: 200px; padding-right: 200px; }
        .Learn_V { background-image: url(/pic/lnlogo.png); background-position: center; background-repeat: no-repeat; background-color: #555555; height: 440px; }
        .Learn_Center h1 { float: left; }
        .Learn_Center h2 { clear: both; }
        .jindu { width: 100px; border: 1px #ccc solid; height: 24px; line-height: 24px; position: relative; float: right; margin-top: 10px; }
        .jindu_txt { position: absolute; top: 0; left: 5px; z-index: 4; }
        .jindu_tiao { position: absolute; top: 0px; left: 0px; width: 0px; display: block; height: 24px; line-height: 24px; background-color: Yellow; z-index: 3; }
        .Learn_VMenu { height: 55px; overflow-y: scroll; margin-top: 5px; }
        .Learn_VMenu a { padding: 5px; border: 1px #ccc solid; background-color: #f4f4f4; }
        
        #masking { z-index: 5; width: 100%; height: 100%; background-color: Black; filter: alpha(opacity=60); -moz-opacity: 0.6; opacity: 0.6; _position: absolute; top: 0px; left: 0px; position: fixed; }
        .qianyan { position: fixed; top: 150px; left: 600px; margin-left: -400px; width: 790px; background-color: White; border: 5px #ff0000 solid; padding: 10px; height: 320px; z-index: 6; }
        .qianyan .qianyuan_v { width: 300px; text-align: center; float: left; }
        .qianyuan_v input { width: 80px; height: 25px; line-height: 25px; }
        .qianyan .qianyan_jd { float: left; padding-left: 10px; width: 480px; z-index: 6; display: inline-block; }
        #closeqianyuan { display: none; position: absolute; right: 10px; top: 0; background-color: #ff0000; width: 40px; text-align: center; height: 30px; line-height: 30px; color: White; cursor: pointer; }
        #closeqianyuan:hover { background-color: #ff4c4c; }
        #MyShipin { position: absolute; top: 160px; left: 600px; margin-left: -387px; z-index: 7px; width: 280px; height: 280px; }
        #facetitle { background-color: #399fce !important; color: White !important; padding: 2px 5px; }
        #swf1 { position: fixed; left: 215px; top: 165px; }
        /*right:201px;bottom:23px;*/
        #faceMsg { position: fixed; right: 290px; bottom: 0; }
    </style>
    <script type="text/javascript">
        var resultKey = $("#submitExam").attr("resultKey"); //xml文件路径
        var pageError = true; //表示页面是否有错误，默认true表示有       
        if(window.parent.document.getElementById("toolbar")!=undefined){
        window.parent.document.getElementById("toolbar").style.display="none";          
        }
        $(function () {            
      //把经常变换的对象预留出来
            resultKey = $("#submitExam").attr("resultKey"); //xml文件路径
            var $currQueCount = $("#currQueCount"); //答题情况
            var $exam_Num = $("#exam_Num"); //题目编号
            var $exam_Type = $("#exam_Type"); //题目类型
            var $exam_Score = $("#exam_Score"); //题目分值
            var $list = $(".ques_Context"); //题目对象
            var $linkList = $(".curr_State>li>a"); //右侧题目编号列表
            var $pageBody = $("body"); //body对象
            var $examItem = $("#examItem"); //左侧题目对象
            var $surplusDate = $("#surplusDate"); //剩余时间的html对象
            if (!$list || $list.length < 1 || !$linkList || $linkList.length < 1) {//页面有错误
                return;
            }
            pageError = false;
            $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); //绑定系统宽高改变事件
            function triggerText() {//触发textarea的blur事件
                var $currText = $(".activeQuetion").find("textarea");
                if ($(".activeQuetion").find("textarea").length > 0) $currText.blur();
            }
            $(".ques_Context").click(function () { divindex = $(this).index(); /*alert($(this).index());*/ }); //添加div的click
            $("#upQuestion").click(function () {//上一题
                // riggerText();
                getAjax("/Training/ExamPlan/NewGetExamPlanUserList.ashx", "status=7&examid=" + QueryString("exam") + "&key=" + QueryString("EPKey"), function (rs) {
                if (rs == 1) {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("StopTest")%>",3000,3);
                    return false;
                }else{               
                    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 () {//下一题
                //  triggerText();
            getAjax("/Training/ExamPlan/NewGetExamPlanUserList.ashx", "status=7&examid=" + QueryString("exam") + "&key=" + QueryString("EPKey"), function (rs) {
                if (rs == 1) {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("StopTest")%>",3000,3);
                    return false;
                } else {
                    var $tempObj = $(".activeQuetion");                    
                    var $tempNumObj = $(".currLinkNum");
                    var boolcheck=false;
                    
                    for( var ii=0;ii<$tempObj.find("input").length;ii++){
                        var gouxuan=$tempObj.find("input")[ii]; 
                        if($(gouxuan).is(':checked')){
                            boolcheck=true;
                        }
                    }

                    if(boolcheck){
                     if(iscensor=="1"){
      $tempObj.find("input").prop('disabled', true);
}
                    }

                    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;
                //triggerText();
                $(".activeQuetion").removeClass("activeQuetion");
                $(".currLinkNum").removeClass("currLinkNum");
                $(this).addClass("currLinkNum");
                $list.eq(parseInt($(this).text()) - 1).addClass("activeQuetion");
            });
            $(".exam_result>li").hover(function () {//选项的悬浮
                if ($(this).has("textarea").length > 0) return;
                if ($(this).has("input[type = text]").length > 0) return;
                $(this).addClass("hoverLi");
            }, function () {
                if ($(this).has("textarea").length > 0) return;
                if ($(this).has("input[type = text]").length > 0) return;
                $(this).removeClass("hoverLi");
            });

            //阻止事件冒泡的通用函数  
            function stopBubble(e) {
                // 如果传入了事件对象，那么就是非ie浏览器  
                if (e && e.stopPropagation) {
                    //因此它支持W3C的stopPropagation()方法  
                    e.stopPropagation();
                } else {
                    //否则我们使用ie的方法来取消事件冒泡  
                    window.event.cancelBubble = true;
                }
            }

            $(".exam_result>li>input[type=radio]").change(function () {//radio选项的选中样式改变
                $(this).parent().parent().children("li").removeClass("checkedInput");
                $(this).parent().addClass("checkedInput");
                postback($(this).parent().parent().children("li"), $(this).attr("name"), $(this).attr("data"), $surplusDate.text(), resultKey, (qh == true) ? $(".activeQuetion").index() : divindex);
            });
            
            $(".exam_result>li>input[type=checkbox]").change(function () {//checkbox选项的选中样式改变
                if ($(this).is(":checked")) {
                    $(this).parent().addClass("checkedInput");
                } else {
                  $(this).parent().removeClass("checkedInput");
                }

                var data = "";
                $(this).parent().parent().children("li").children("input:checked").each(function () {
                    data += $(this).attr("data");
                });
                postback($(this).parent().parent().children("li"), $(this).attr("name"), data, $surplusDate.text(), resultKey, $(".activeQuetion").index());               
            });

            $(".exam_result>li>input[type=text]").blur(function () {
                var data = "";
                $(this).parent().parent().children("li").children("input:text").each(function () {
                    data += $(this).val();
                });
                postback($(this).parent().parent().children("li"), $(this).attr("name"), data, $surplusDate.text(), resultKey, (divindex == -1) ? $(".activeQuetion").index() : divindex);
            });

            $(".exam_Title>input[type=text]").blur(function () {
                var data = "";
                $(this).parent().children("input:text").each(function () {
                    data += $(this).val() + "、";
                });
                data = data.length > 0 ? data.substring(0, data.length - 1) : "";
                postback($(this).parent().parent().children("li"), $(this).attr("name"), data, $surplusDate.text(), resultKey, (divindex == -1) ? $(".activeQuetion").index() : divindex);
            });

            $(".exam_result>li>textarea").blur(function () {
                postback($(this), $(this).attr("name"), $(this).val(), $surplusDate.text(), resultKey, $(".activeQuetion").index());
            });
            $("label").click(function (e) {//阻止事件冒泡，如果不阻止则单击li触发label的click()，然后label又触发li的click，冒泡无限循环了
                stopBubble(e);
            });
            // $(".exam_result>li").click(function (e) {//li单击事件
            //     $(this).children("label").click();
            // });
            function postback(objList, questionKey, itemKey, overplus, resultKey, currIndex) {
                ///	<summary>
                ///     答题方法
                ///     &#10;postback(objList,questionKey, itemKey, overplus,resultKey) - 答题方法
                ///	</summary>
                ///	<param name="objList" type="list">要锁定的一组（或一个）对象</param>
                ///	<param name="questionKey" type="string">题目ID</param>
                ///	<param name="itemKey" type="string">答案</param>
                ///	<param name="overplus" type="double">当前剩余时间</param>
                ///	<param name="resultKey" type="string">xml文件路径名</param>
                ///	<returns type="void" />
                /*
                $(objList).attr("disabled", "disabled"); //锁住选项
                $(objList).prop('disabled', true);
                
                $(objList).find("input").attr("disabled", "disabled"); //锁住选项
                */
                $(objList).find("input").prop('disabled', true);
                $.ajax({
                    url: "ReplyQuesion.ashx",
                    type: "post",
                    data: { "replay": itemKey, "queKey": questionKey, "resultKey": resultKey, "overplus": overplus },
                    dataType: "text",
                    success: function (data) {
                        if (data) {
                            if (qh == true) {
                                $(".ques_Context").click(function () { divindex = $(this).index(); /*alert($(this).index());*/ }); //添加div的click                            
                            } else {
                                divindex = $(".activeQuetion").index();
                            }                            
                            if (qh == true && divindex == -1) {
                                $(objList).find("input").removeAttr("disabled"); //释放选项
                                return;
                            }
                            if (parseInt(data) < 0) {
                                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_sjtjyc")%>", 2000, 5);
                            } else {//答题成功                                
                                currIndex =  divindex;
                                if (parseInt(data) == 0) {//取消回答
                                    $linkList.eq(currIndex).removeAttr("style");
                                    $currQueCount.text(parseInt($currQueCount.text()) - 1);
                                } else {//回答成功
                                    if(iscensor=="1"){
                                        //alert("ddd");
                                           
                                        $("#upQuestion").prop('disabled', true);//.attr("disabled", "disabled");
                                        $linkList.eq(currIndex).prop('disabled', true);//.attr("disabled", "disabled");
                                        $linkList.eq(currIndex).css({ "background-color": "#a0ff76", "color": "black"});
                                    }else{
                                  
                                        $linkList.eq(currIndex).css({ "background-color": "#a0ff76", "color": "black" });
                                    }
                                    $currQueCount.text(data);
                                }
                            }
                        } else {
                            showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_wlljyc")%>", 2000, 5);
                        }
                        $(objList).find("input").removeAttr("disabled"); //释放选项
                    },
                    error: function () {
                        showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_wlljyc")%>", 2000, 5);
                        $(objList).find("input").removeAttr("disabled");
                    }
                });
            }
            $("#submitExam").click(function () {//提交试卷按钮
            getAjax("/Training/ExamPlan/NewGetExamPlanUserList.ashx", "status=7&examid=" + QueryString("exam") + "&key=" + QueryString("EPKey"), function (rs) {
            if (rs == 1) {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("StopTest")%>",3000,3);
                return false;
              }else {
                  showConfirmMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_tijiao")%>", function () {
                  if(window.parent.document.getElementById("toolbar")!=undefined){
                  window.parent.document.getElementById("toolbar").style.display="block"; 
                  }
                    var url = "/Training/Exam/Report.aspx?key=" + resultKey + "&&EPKey=" + QueryString("EPKey")+"&overplus="+ $surplusDate.text();
                    window.parent.parent.openDialog("/Training/Exam/Report.aspx?exam=<%=Request["exam"] %>&not=exam&key=" + resultKey + "&EPKey=" + QueryString("EPKey")+"&overplus="+ $surplusDate.text(), 'ReportInfo', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_sjtj")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_dtbg")%>', 550, 220, 50, 50);
//                    <% if(Request["exam"]==null || Request["exam"].ToString()==""){ %>
//                    window.location = "/Training/Exam/ExamHistory_List.aspx";
//                    <%} %>
                });
        }
        });
            });
        });
        /*
        *@Discription : 倒计时
        */
        var minute; //剩余分钟
        var second = 0; //剩余秒钟
        var interValObj; //计时方法
        var iscensor="<%=iscensor %>";//试卷审题（0：允许、1：不允许）
        window.onload = function () {//页面加载完成开始倒计时
            $surplusDate = $("#surplusDate");
            minute = parseInt($("#surplusDate").text());          
            second = $("#surplusDate").text().split(":")[1];
            interValObj = window.setInterval(setRemainTime, 1000);
            if("<%=exam.Examination_show %>"=="1"){
                qiehuan();//btnsjxs
            }            
        }

        function setRemainTime() { //倒计时方法
            if (pageError)//页面有错误
                return;
            if (minute == 0 && second == 0) {
                window.clearInterval(interValObj);
                $surplusDate.text("00:00");
                alert("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_sjdxtzdjj")%>");
                //showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_sjdxtzdjj")%>", 4000, 3);
                //top.openDialog("/Training/Exam/Report.aspx?exam=Not&key=" + resultKey, 'ReportInfo', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_sjtj")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_dtbg")%>', 550, 220, 50, 50);
                window.parent.parent.openDialog("/Training/Exam/Report.aspx?exam=Not&key=" + resultKey, 'ReportInfo', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_sjtj")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_dtbg")%>', 550, 220, 50, 50);
                window.parent.window.history.go(-1); //跳转页面
            } else {
                second -= 1;
                if (second < 0) {
                    second = 59;
                    minute -= 1;
                }
        
                $surplusDate.text((minute.toString().length == 1 ? "0" + minute : minute) + ":" + (second.toString().length == 1 ? "0" + second : second));
                  var djstime=(minute.toString().length == 1 ? "0" + minute : minute) + ":" + (second.toString().length == 1 ? "0" + second : second);
                if ( djstime == "05:00") {
                showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Exam_kssysj")%>',3000,3);
                }
            }
        }
        var mathcontent = "";
        function mathshow(mathname) {
            mathcontent = mathname;
            //alert(mathcontent);
            $("#mathquill").show();
        }
        //光标处插入图片
        function funInsertTopic(textObj, textStr) {
            textObj.focus();

            var topic = textStr, value = textObj.value, index = value.indexOf(topic);
            if (index === -1) {
                //匹配
                funTextAsTopic(textObj, topic);
            }
            value = textObj.value;
            index = value.indexOf(topic);
            if (textObj.createTextRange) {
                var range = textObj.createTextRange();
                range.moveEnd("character", (index + textStr.length) - value.length);
                range.moveStart("character", index);
                range.select();
            } else {
                textObj.setSelectionRange(index, index + textStr.length);
                textObj.focus();
            }
        };
        function funTextAsTopic(textObj, textFeildValue) {
            if (textObj.createTextRange) {
                var caretPos = document.selection.createRange().duplicate();
                document.selection.empty();
                caretPos.text = textFeildValue;
            } else if (textObj.setSelectionRange) {
                var rangeStart = textObj.selectionStart;
                var rangeEnd = textObj.selectionEnd;
                var tempStr1 = textObj.value.substring(0, rangeStart);
                var tempStr2 = textObj.value.substring(rangeEnd);
                textObj.value = tempStr1 + textFeildValue + tempStr2;
                textObj.blur();
            }
        };

        var qh = false;
        var divindex = -1;
        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();
                    $(".curr_State li a").removeClass("currLinkNum");
                }
            }
              if (qh == false) {
                divindex = -1;
                $(".ques_Context").unbind("click"); //移除click
            } 
        }

     
    </script>
    <script type="text/javascript">

         var face1 = "<%=RM.Common.DotNetBean.RequestSession.GetSessionUser().faceid %>"; //"b7af028666fe3630f8e49d9efaac9f08"; //用户faceid
         var faceNum = "<%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("Face_Num") %>"; //验证失败次数
         var faceTime = <%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("Face_Time") %>; //验证的时间(秒)
         var facelike = <%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("Face_Like") %>; //相似度
         var camType = <%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("Face_camType") %>; //无摄像头处理 1：提示剔出 2：不验证
         var valiType = <%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("Face_valiType") %>; //验证失败处理  1：提示剔出 2：提示并记录 3：不处理
         var isVali = <%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("isVali") %>; //是否启动人脸识别
         var faceImg = "<%=faceImg %>";//用户照片


    </script>
    <script src="/Training/Face/ckplayer.js" type="text/javascript"></script>
</head>
<body onpaste="return false" oncopy="return false;" oncontextmenu="window.event.returnValue=false">
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div runat="server" id="ExaminationPaperTitle">
        </div>
    </div>
    <%--
<div class="btnbarcontetn">
    <div style="text-align: right;">
        <a class="button green"  onclick="javascript:qiehuan();" title="切换试题查看形式" >试题形式(单体/列表)</a>
  <input type="button" class="button" value="试题形式(单体/列表)" onclick="javascript:qiehuan();" /> 
    </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">
                <label class="asterisk">
                    *
                </label>
                <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_tsdjxxjkdtxzdah")%><br />
                &nbsp;&nbsp;<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_djsytxytan")%>
            </div>
        </div>
        <div id="toolBar">
            <ul id="currState">
                <li id="prot_Title">&nbsp;&nbsp;<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_kssysj")%></li>
                <li id="surplusDate" runat="server">00:00</li>
            </ul>
            <div id="submitContainer">
                <a href="javascript:void(0)" id="submitExam" resultkey="<%=resultKey %>">
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Exam_qdjj")%></a>
            </div>
            <div id="currStateInfo">
                <div class="ans_State">
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_dtqk")%>
                    <a class="button green" onclick="javascript:qiehuan();" title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_stxsdtlb")%>"
                        style="padding: 2px; width: 185px; display: none;" id="btnsjxs">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_stxsdtlb")%></a></div>
                <div id="ans_State" style="display: none;">
                    <label id="currQueCount" runat="server">
                        0</label>/<label id="sumQueCount"><%=SumCount %></label></div>
                <ul class="curr_State">
                    <li>
                        <%=LinkStateHtml.ToString() %>
                    </li>
                </ul>
                <div class="promptContext">
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_tishi")%><br />
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_dgdtmxshs")%><br />
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Examination_wdgdxsbs")%></div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
    </form>
    <div id="mathquill" style="width: 600px; position: absolute; height: 300px; left: 0;
        bottom: 0; background-color: White; display: none; z-index: 9999;">
        <iframe src="/Training/TrainingTest/gs/mathdialog.html" width="600" height="300"
            scrolling="no" frameborder="0" style="padding: 0;"></iframe>
    </div>
    <link rel="stylesheet" type="text/css" href="/Themes/Scripts/Lightbox/Lightbox/css/style.css">
    <script type="text/javascript" src="/Themes/Scripts/Lightbox/Lightbox/js/jquery.colorbox-min.js"></script>
    <script type="text/javascript" src="/Themes/Scripts/Lightbox/Lightbox/js/lrtk.js"></script>
    <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>
