<%@ page autoeventwireup="true" debug="true" inherits="_User_Exam_Practice_sing, App_Web_gtwvn7zn" language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>考试</title>
 <%--  <link href="../css/main.css" rel="stylesheet" type="text/css" />--%>
    <link href="../css/control.css" rel="stylesheet" type="text/css"  />
    <link href="../css/StyleSheet.css" rel="stylesheet" type="text/css" />
 <link href="../css/pager.css" rel="stylesheet" type="text/css" />

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script src="../jquery-1.5.js" type="text/javascript"></script>


    <script  src="../js/ajaxdroplist.js" type="text/javascript"></script>

    <link href="../alert/jquery.alert.css" rel="stylesheet" type="text/css" />

    <script src="../alert/jquery.easydrag.js" type="text/javascript"></script>

    <script src="../alert/jquery.alert.js" type="text/javascript"></script>
    <script  type="text/javascript"  language="javascript" >
    
    

    
    function submitExam2()
    {
    alert('提交完成!!!'); 
    } 
    
    function btnClick(typeid,typename)
    {
   
   //alert(typeid)
   
//   var ctrl=document.getElementById ("ctrl");
  // ctrl.value=typeid;
   
//   var btt=document.getElementById  ("TypeListBottom").getElementsByTagName ("input");
//   if (btt!=null)
//   {
//        for(var i = 0; i < btt.length; i++) 
//        { 
//        if (btt[i].id=="btnbottom"+typeid && btt[i].type=="button")
//        {
//        btt[i].className="button_r";
//        
//        }
//        else 
//        {
//          btt[i].className="button_b";
//        }
//   
//      }
//  }
//   var b_type=document.getElementById  ("TypeList").getElementsByTagName ("input");
//   if (b_type!=null)
//   {
//        for(var i = 0; i < b_type.length; i++) 
//        { 
//        if (b_type[i].id=="btn"+typeid && b_type[i].type=="button")
//        {
//        b_type[i].className="button_r";
//        
//        }
//        else 
//        {
//          b_type[i].className="button_b";
//        }
//   
//      }
//  }
     var div=document.getElementById  ("ExamBody").getElementsByTagName ("div");
   if (div!=null)
   {
 
        for(var i = 0; i < div.length; i++) 
        { 
        
        if (div[i].id=="QType"+typeid && div[i].className=="QType" )
        {
        
        div[i].style.display="block";
        
        }
        else if( div[i].className=="QType")
        {
       
         div[i].style.display="none";
        }
   
      }
  }
   
    document.documentElement.scrollTop=0;
 
    
    }
  
// idTest=document.getElementById('gotopbtn');
// idTest.onclick=function (){
//  document.documentElement.scrollTop=0;
//  sb();
//  }
// window.onscroll=sb;
// function sb(){
//  if(document.documentElement.scrollTop==0){
//   idTest.style.display="none";
//   }else{
//    idTest.style.display="block";
//    }
//  }
  
  
     function btnClick1(typeid,typename)
    {
   
   
   
   var ctrl=document.getElementById ("ctrl");
   ctrl.value=typeid;
   
   var btt=document.getElementById  ("TypeListBottom").getElementsByTagName ("input");
   if (btt!=null)
   {
        for(var i = 0; i < btt.length; i++) 
        { 
        if (btt[i].id=="btnbottom"+typeid && btt[i].type=="button")
        {
        btt[i].className="button_r";
        
        }
        else 
        {
          btt[i].className="button_b";
        }
   
      }
  }
   var b_type=document.getElementById  ("TypeList").getElementsByTagName ("input");
   if (b_type!=null)
   {
        for(var i = 0; i < b_type.length; i++) 
        { 
        if (b_type[i].id=="btn"+typeid && b_type[i].type=="button")
        {
        b_type[i].className="button_r";
        
        }
        else 
        {
          b_type[i].className="button_b";
        }
   
      }
  }
     var div=document.getElementById  ("ExamBody").getElementsByTagName ("div");
   if (div!=null)
   {
 
        for(var i = 0; i < div.length; i++) 
        { 
        
        if (div[i].id=="QType"+typeid && div[i].className=="QType" )
        {
        
        div[i].style.display="block";
        
        }
        else if( div[i].className=="QType")
        {
       
         div[i].style.display="none";
        }
   
      }
  }
   
   // document.documentElement.scrollTop=0;
 
    
    }
  

    //--------------------
    
    function clear_choose()
    {
    
    
       var ctrl=document.getElementById ("ctrl");
   ctrl.value="0";
     var btt=document.getElementById  ("TypeListBottom").getElementsByTagName ("input");
   if (btt!=null)
   {
        for(var i = 0; i < btt.length; i++) 
        { 
      
          btt[i].className="button_b";
       
   
      }
  }
   var b_type=document.getElementById  ("TypeList").getElementsByTagName ("input");
   if (b_type!=null)
   {
        for(var i = 0; i < b_type.length; i++) 
        { 
       
          b_type[i].className="button_b";
        
   
      }
  }
    
    }
    
    
    function singcheck(tid,check)
    {
  var tt=  document.getElementById(check.id).getElementsByTagName ("input"); 
  
   for(var i = 0; i < tt.length; i++) 
        { 
      if(tt[i].type=="radio")
      {
      
     alert( tt[i].value)
      
      }
  
  
            }
  
  
    alert(tid+"__"+tt.length+"_"+check.id)
    }
    
    
    function disp_confirm(s)    
  {    
  var r=confirm(s)    
  if (r==true)    
    {    
    alert(1)
    }    
  else    
    {    
   alert(0) 
    }    
  }    

    
    
    </script>
</head>
<body marginheight="0" marginwidth="0" onload="if(parent.cen!=null){parent.cen.cols='0,*';parent.centop.rows='0,*,0'};"
    scroll="auto" style="float: left; width: 960px; margin: 0px auto; background: url(../images/bg_body.png) repeat-x;
    background-attachment: fixed;">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        &nbsp;
      
               <%-- <div style="text-align: center; padding-bottom: 10px;">
                    <asp:Label ID="paper_title" runat="server" Font-Bold="true" Font-Names="宋体" Font-Size="15"
                        ForeColor="Black" Text=""></asp:Label>
                    <asp:Label ID="paper_score" runat="server" Font-Bold="true" Font-Names="宋体" Font-Size="15"
                        ForeColor="red" Text=""></asp:Label>
                </div>
           --%>
        <asp:HiddenField ID="ctrl" runat="server" Value="0" />
     
                <div id="ExamTop">
                    <div class="l">
                        &nbsp;</div>
                    <div class="m">
                        <span>考试时间：<%= Request["time"].ToString()%> 分钟</span> <span>考生：<%=ViewState["name"].ToString ()%></span><span>姓名：<%= ViewState["xm"].ToString ()%></span><span>总分 ：<%=Request["point"].ToString () %> 分</span>
                        <span>通过分：<%= Request["passpoint"].ToString () %> 分</span>
                    </div>
                    <div class="r">
                        &nbsp;</div>
                </div>
                <div id="ExamName">
                    <%= Request["planname"].ToString()%>
                    <img id="viewHelp" alt="" src="../images/help.gif" title="查看【考试帮助】">
                 <%--   <a id="selectFontSize" href="#" style="font-size: 12pt">【字号选择】</a>--%>
                </div>
                <div id="ExamType">
                    <span id="TypeList">
                        <asp:Literal ID="Literal3" runat="server"></asp:Literal>
                     
                     
                    </span>
                </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
            
               
                <span id="ExamBody">
                    <asp:DataList ID="paper_list"  runat="server" DataKeyField="Exa_Topid" OnItemDataBound="paper_list_ItemDataBound"
                        Width="100%">
                  
                        <ItemTemplate>
                        
                            <div id="QType<%# (Container.ItemIndex + 1 + (int.Parse(page_indexpage.Text) - 1) * 1)%>"
                                class="QType" style="display: block;">
                                <div class="TypeTitle">
                                    <a name="type1"></a><a id="typeaction1" href="#type1"></a>
                                    
                                    
                                    <asp:Literal ID="Literal4" runat="server"></asp:Literal>
                                  
         <%# Eval("Typ_name") + " (" + Eval("TidTitle") + ")  共" + Eval("tishu") + "小题，每题" + Eval("Tid_Score") + "分"%>
                                        <asp:HiddenField ID="score" runat="server" Value='<%# Eval("Tid_Score") %>' />
                                    <asp:HiddenField ID="TidType" runat="server" Value='<%# Eval("TidType") %>' />
                            </div>
                            
                                                      <div class="Body">
                                                                <asp:Panel ID="Panel5" runat="server" CssClass="QName">
                                                                <%--  <%# Eval("Topic_no") %>--%>
                                                               <%-- <%#Container.ItemIndex + 1 + (int.Parse(page_indexpage.Text)-1) * 20%>--%>
                                                                 <asp:Label ID="Label4" runat="server" ForeColor="red" Text='<%# "第" + (Container.ItemIndex + 1 + (int.Parse(page_indexpage.Text) - 1) * 1) + "题" %>'></asp:Label>
                                                                 <asp:Literal ID="Label1" runat="server" ></asp:Literal>
                                                                <asp:HiddenField ID="fill_count"  Value="0" runat="server" />
                                                                 <asp:Panel ID="Panel4" runat="server" style="display:inline ">
                                                                 <asp:Label ID="l0" runat="server" Text=""></asp:Label>
                                                                 
                       <asp:TextBox ID="t0" runat="server" AutoPostBack="true" 
                           OnTextChanged="t0_TextChanged" Style="border: none; border-bottom: 1px solid DarkGray;"></asp:TextBox>
                                                                 <asp:Label ID="l1"  Visible="false"  runat="server" Text=""></asp:Label>
                                    <asp:TextBox ID="t1" runat="server" CssClass="fill" OnTextChanged="t1_TextChanged"
                                        Style="border: none; border-bottom: 1px solid DarkGray; "
                                        Visible="false" AutoPostBack="true" ></asp:TextBox>
                                                                    <asp:Label ID="l2" Visible="false"  runat="server" Text="Label"></asp:Label>
                                                                    <asp:TextBox ID="t2" runat="server" AutoPostBack="true" OnTextChanged="t2_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l3" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t3" runat="server" AutoPostBack="true" OnTextChanged="t3_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l4"  runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t4" runat="server" AutoPostBack="true" OnTextChanged="t4_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l5" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t5" runat="server" AutoPostBack="true" OnTextChanged="t5_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l6" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t6" runat="server" AutoPostBack="true" OnTextChanged="t6_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l7" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t7" runat="server" AutoPostBack="true" OnTextChanged="t7_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                        Visible="false"></asp:TextBox>
                                                                     <asp:Label ID="l8" runat="server" Text="" Visible="false"></asp:Label>
                                                                     <asp:TextBox ID="t8" runat="server" AutoPostBack="true" OnTextChanged="t8_TextChanged"
                                                                         Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                         Visible="false"></asp:TextBox>
                                                                     <asp:Label ID="l9" runat="server" Text="" Visible="false"></asp:Label>
                                                                     <asp:TextBox ID="t9" runat="server" AutoPostBack="true" OnTextChanged="t9_TextChanged"
                                                                         Style="border: none; border-bottom: 1px solid DarkGray; "
                                                                         Visible="false"></asp:TextBox>
                                                                        
                                                                </asp:Panel>
                                                                <%#"【章节：" + Eval("K_Name") + " 题型：" + Eval("Typ_name") + "】"%>
                                                                 
                                                                </asp:Panel>
                                                               
                                                         
                                                               <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                                                         
                                                            </div>
                                                   
                                                        <div >
                                                        <asp:Panel ID="Panel2" runat="server" CssClass="Answer" style="vertical-align:middle; display:inline ;  ">
                                                            选择答案：
                                     <asp:RadioButtonList ID="singchoose" runat="server" AutoPostBack="true" 
                                         OnSelectedIndexChanged="singchoose_SelectedIndexChanged" RepeatColumns="10" Style="display: inline"
                                         TextAlign="Left" ValidationGroup="singchoose">
                                                              </asp:RadioButtonList>
                                                        <asp:CheckBoxList ID="doubchoose" AutoPostBack="true"  runat="server" RepeatColumns="10" Style="display: inline"
                                                            TextAlign="Left" OnSelectedIndexChanged="doubchoose_SelectedIndexChanged">
                                                        </asp:CheckBoxList>
                                                        </asp:Panel>
                                                        <asp:Panel ID="Panel3" runat="server" Style="display: inline;">
                                              <asp:TextBox ID="fill1"   AutoPostBack="true"    runat="server"  OnTextChanged="fill1_TextChanged"
                                                  Rows="8" TextMode="MultiLine" Width="100%">
                                              </asp:TextBox> 
                                              <br />
                                              <br />
                                                        </asp:Panel>
                                                        </div>
                                                        
                                                <asp:Panel ID="AnswerAdmin" runat="server" CssClass="AnswerAdmin" >
                                                                <span style="color: Red; font-weight: bolder;">答案：</span>
                                                   <asp:Label ID="Label3" runat="server" Font-Bold="true" ForeColor="Red" Text="Label"></asp:Label>
                                                                <asp:HiddenField ID="answer" runat="server" />
                                                           
                                                </asp:Panel>
                                                          
                                                                <asp:Panel ID="AnswerMark" runat="server" CssClass="AnswerMark" Style="display: none">
                                                            
                                                                <span style="color: black; font-weight: bolder;">关键词：  
                                                                </span>
                                                               <%# Eval("Top_KeyWord")%>
                                                                <asp:HiddenField ID="guanjianci" runat="server" />
                                                                </asp:Panel> 
                                                           
              
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                </span>
                <div style="left: 266.5px; bottom: 0px; ">
                    <div id="ExamTool_Single">
                        <div style="float: left; margin-left: 50px; width: 730px;">
                            <span id="TypeListBottom">
                                <asp:Literal ID="Literal2" runat="server"></asp:Literal>
                            </span>
                            <asp:Panel ID="Panel22" runat="server" 
                                Visible="true" Width="180px" style="display:inline ">
                         
                                    <table border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td align="left">
                                                <webdiyer:AspNetPager ID="PagerButtom" runat="server" AlwaysShow="true" BorderColor="Aqua"
                                                    CssClass="paginator" CustomInfoClass="" CustomInfoHTML="" CustomInfoSectionWidth=""
                                                    FirstPageText="首题" HorizontalAlign="Right" LastPageText="尾题" LayoutType="Table"
                                                    NextPageText="下一题" NumericButtonCount="10" OnPageChanged="Pager_PageChanged"
                                                    PageIndexBoxClass="cpb" PrevNextButtonsClass="" PrevPageText="上一题" ShowCustomInfoSection="Right"
                                                    ShowMoreButtons="false" ShowPageIndex="false" ShowPageIndexBox="Never">
                                                </webdiyer:AspNetPager>
                                            </td>
                                            <td>
                                                <asp:Button ID="Button1" runat="server" CssClass="button_g" OnClick="Button1_Click1"
                                                    Text="检测答卷" />
                                                <asp:Button ID="Button2" runat="server" CssClass="button_b" OnClick="Button2_Click"
                                                    Text="提交试卷" />
                                            </td>
                                        </tr>
                                    </table>
                           
                            </asp:Panel>
                            <%--   <img id="viewHelpBottom" alt="" src="../images/help.gif" title="查看【考试帮助】"/>--%>
                            <%--     <input id="checkExam" class="button_g" type="button"   value="检测答卷"/>--%>
                         
                        </div>
                        <div id="timer" style="float: right; width: auto; color: #ff0000; margin-right: 10px;">
                        </div>
                    </div>
                </div>
                
                    <asp:HiddenField ID="IsEdit" runat="server" />
                    <asp:HiddenField ID="modify" runat="server" />
            
            </ContentTemplate>
            <Triggers>
              <asp:AsyncPostBackTrigger ControlID="Button1" />
                <asp:AsyncPostBackTrigger ControlID="Button2" />
              </Triggers> 
        </asp:UpdatePanel>
        <asp:Literal ID="Literal5" runat="server"></asp:Literal>
        <script language="JavaScript" type="text/javascript">   
        var maxtime = <%=minute %>*60-3 //一个小时，按秒计算  
        function CountDown()
        {   
            if(maxtime>=0)
            {   
                minutes = Math.floor(maxtime/60);   
                seconds = Math.floor(maxtime%60);   
                document.all["timer"].innerHTML="计时："+minutes+"分"+seconds+"秒"; 
                if(maxtime == 5*60) alert('注意，距离考试结束还有5分钟！请及时答题，做好交卷准备。');   
                --maxtime;   
            }   
            else
            {   
                clearInterval(timer);   
                alert("考试时间到，强制交卷！");
                submitExam_Practice();//交卷
                //window.opener= null;window.open("", "_self");window.close();
            }   
        }   
        setInterval("CountDown()",1000);   
        </script>

    

        
        
    </form>
 
    <asp:Label ID="lb_pageid" runat="server" Text="" Visible="false"></asp:Label>
    <asp:Label ID="recordcount" runat="server" Visible="false"></asp:Label>
    <asp:Label ID="page_indexpage" runat="server" Text="1" Visible="false"></asp:Label>
    <asp:Label ID="page_count" runat="server" Text="0" Visible="false"></asp:Label>
<asp:Label ID="l2" runat="server" ></asp:Label>
</body>
</html>
