<div class="layout banks_list">
	<?php $upper_nums = C('UPPER_NUM'); ?>
	<?php $bank_view_num_show = $bank_num = $iframe_num = 0;?>
	<!--循环显示题型 start-->
	<?php foreach ($_SESSION['info']['datas']['childs'] as $conf): ?>
	<?php $bank_view_num_show++; ?>
	
	<div class="header bank_view_title bank_view_title_<?=$bank_view_num_show?>">
		<div id="bank_view_title" class="h_left bank_view_title bank_view_title2_<?=++$bank_view_num?>" bank_view_title="<?=$conf['title'];?>" ><?=$conf['title'];?></div>
		<div class="h_right">考试剩余时间：<span id="countdown" class="red rest_time"></span></div>
	</div>
		<!--循环试题 start-->
		
		<?php $bank_num_show = 0; foreach ($conf['bankids'] as $bankid): ?>
		<?php $bank = $_SESSION['info']['banks'][$bankid]; $bank_num++; $bank_num_show++; ?>
		<?php if ($bank_num_show == 1): ?>
		<input type="hidden" class="first_bank_num_<?=$bank_view_num_show?>" first_bank_num="<?=$bank_num?>" />
		<?php endif; ?>
		<!--简答题 start-->
		<?php if ($bank['bank_type_id'] == 4 || ($bank['bank_type_id'] == 5 && $bank['show_type_id'] == 2)): ?>
	<div id="box" class="bank bank_num_<?=$bank_num;?>" bank_view_num_show="<?=$bank_view_num_show?>" bank_id="<?=$bank['id']?>" bank_type_id="<?=$bank['bank_type_id']?>" marktag="0" zoomIndex="<?=($bank['bank_type_id'] == 5)?2:1;?>">
		<div id="div_q_info" class="question-info" style="height: 200px; opacity: 1;">
			<div class="toolbar">
		    	<div class="tit2">资料区</div>
				<span class="more" style=" background:none"><span onmousedown="javascript:copy();" unselectable="on"><i class="icon-copy"></i>复制</span><span onmousedown="javascript:void(0);" class="domark" unselectable="on"><i class="icon-flag"></i>标记</span><span onmousedown="javascript:void(0);" class="dounmark" unselectable="on"><i class="icon-flag-c"></i>取消标记</span><span onclick="javascript:zoomBig('top');" unselectable="on" class="zoomb"><i class="icon-zoom-in"></i>放大窗口</span><span onclick="javascript:zoomSml('top');" unselectable="on" style="display:none" class="zooms" ><i class="icon-zoom-out"></i>恢复窗口</span></span>
			</div>
			
			<div id="question" class="srk question">
		        <div>
					<p><?=(($bank['bank_type_id'] == 5)?"（".$upper_nums[$bank_num_show]."）、":$bank_num_show."、").$bank['content']?></p>
				</div>
	       	</div>
		</div>
		
		<!--答题区-->
		<div id="line"></div>
		<div id="div_q_bottom" class="question-opt">
			
			<div class="toolbar01">
				<span class="more"><span onclick="copyEditor();" unselectable="on"><i class="icon-copy"></i>复制</span><span onclick="cutEditor();" unselectable="on"><i class="icon-cut"></i>剪切</span> <span onclick="pasteEditor();" unselectable="on"><i class="icon-paste"></i>粘贴</span><span onmouseover="javascript:showEquation(event);" class="hasdrop" id="inputEQ_q1"><i class="icon-formula"></i>公式和符号</span><span onmouseover="javascript:showMatrix();" id="div_Matrix" class=""><i class="icon-matrix"></i>矩阵</span><span onclick="javascript:changeIME();"><i class="icon-ch"></i>输入法</span><span onclick="javascript:showCalc();"><i class="icon-cal"></i>计算器</span><span onclick="zoomBig('bot');" unselectable="on" id="zoomb_" class="zoomb_" style=""><i class="icon-zoom-in"></i>放大窗口</span><span onclick="javascript:zoomSml('bot');" unselectable="on" style="display: none;" id="zooms_" class="zooms_"><i class="icon-zoom-out"></i>恢复窗口</span></span>
				
				<!-- 字体切换 -->
				<div style="left: 743px; top: 44px;display:none;" class="toolbar-pop pop-ch ime_div ime" id="toolbar_pop">
					<style>
					.pop-ch {border:1px solid #C1CEE3;position:absolute;width:140px;z-index:2;}
					.toolbar-pop {background-color:#FFF;box-shadow:3px 3px 5px rgba(0, 0, 0, 0.2)}
					</style>
					<span class="arrow"></span>
					<p class="ime_"><a href="#setInputMethod/微软拼音">微软拼音</a></p>
					<p class="ime_"><a href="#setInputMethod/全拼">全拼输入法</a></p>
					<p class="ime_"><a href="#setInputMethod/智能ABC">智能ABC </a></p>
					<p class="ime_"><a href="#setInputMethod/谷歌">谷歌拼音输入法</a></p>
					<p class="ime_"><a href="#setInputMethod/搜狗">搜狗输入法</a></p>
					<p class="ime_"><a href="#setInputMethod/王码">王码五笔型输入法</a></p>
					<p class="ime_"><a href="#setInputMethod/极品">极品五笔输入法</a></p>
					<p class="ime_"><a href="#setInputMethod/万能">万能五笔输入法</a></p>
				</div>
				<!-- 字体切换 -->
				
				<!-- 公式编辑器-->
				<div class="gs gs_<?=$bank_num?>" id="box_div_editor_client" style="display: none" class="toolbar-pop pop-formula">
					<span class="arrow"></span>
					<div class="gs_tit">
					<ul>
					<li id="twoo1" class="hover"><input type="button" value="常用公式" class="gs_an" style=" background:none; border:0px; cursor:pointer" onmouseup="setTab('twoo',1,3,event)" /></li>
					<li id="twoo2"><input type="button" value="数学符号" style=" background:none; border:0px; cursor:pointer" onmouseup="setTab('twoo',2,3,event)" /></li>
					<li id="twoo3"><input type="button" value="希腊字母" style=" background:none; border:0px; cursor:pointer" onmouseup="setTab('twoo',3,3,event)" /></li>
					</ul>
					</div>
					<div id="div_FormulaBlock" class="menuDiv">
					<div id="con_twoo_1">
					<div class="gs_nr">
					<ul class="content">
						<li class="fc1"><a onmouseup="insertWrite('\\frac', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc2"><a onmouseup="insertWrite('^{}/_{}', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc3"><a onmouseup="insertWrite('x^', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc4"><a onmouseup="insertWrite('x_', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc5"><a onmouseup="insertWrite('x_{}^{}', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc6"><a onmouseup="insertWrite('\\bar{x}', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc7"><a onmouseup="insertWrite('\\sqrt', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<!--<li class="fc8"><a onmouseup="insertWrite('\\nthroot3{}', true);return false;" href="javascript:void(0);">&nbsp;</a></li>-->
						<li class="fc9"><a onmouseup="insertWrite('\\nthroot', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc10"><a onmouseup="insertWrite('\\sum^{}_{n=}', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc11"><a onmouseup="insertWrite('\\sum', false);return false;" href="javascript:void(0);">&nbsp;</a></li> 
						<li class="fc12"><a onmouseup="insertWrite('\\log_{}\\left(\\right)', true);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fc13"><a onmouseup="insertWrite('\\ln', false);return false;" href="javascript:void(0);">&nbsp;</a></li>    
					</ul>
					</div>
					</div>
					<div id="con_twoo_2" style="display: none;">
					<div class="gs_nr">
					<ul>
					<li class="fa1"><a onmouseup="insertWrite('+', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa2"><a onmouseup="insertWrite('-', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa3"><a onmouseup="insertWrite('\\pm', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa4"><a onmouseup="insertWrite('\\times', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa5"><a onmouseup="insertWrite('\\ast', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa6"><a onmouseup="insertWrite('\\div', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa7"><a onmouseup="insertWrite('/', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa8"><a onmouseup="insertWrite('\\infty', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa9"><a onmouseup="insertWrite('\\partial', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa10"><a onmouseup="insertWrite('\\bigtriangleup', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa11"><a onmouseup="insertWrite('=', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa12"><a onmouseup="insertWrite('\\ne', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa13"><a onmouseup="insertWrite('\\approx', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fa14"><a onmouseup="insertWrite('&gt;', false);return false;" href="javascript:void(0);">&nbsp;</a></li> 
						<li class="fa15"><a onmouseup="insertWrite('&lt;', false);return false;" href="javascript:void(0);">&nbsp;</a></li>  
						<li class="fa16"><a onmouseup="insertWrite('\\ge', false);return false;" href="javascript:void(0);">&nbsp;</a></li>  
						<li class="fa17"><a onmouseup="insertWrite('\\le', false);return false;" href="javascript:void(0);">&nbsp;</a></li> 
					</ul>
					</div>
					</div>
					<div id="con_twoo_3" style="display: none;">
					<div class="gs_nr">
					<ul>
						<li class="fb1"><a onmouseup="insertWrite('\\alpha', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb2"><a onmouseup="insertWrite('\\beta', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb3"><a onmouseup="insertWrite('\\gamma', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb4"><a onmouseup="insertWrite('\\delta', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb5"><a onmouseup="insertWrite('\\varepsilon', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb6"><a onmouseup="insertWrite('\\varphi', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb7"><a onmouseup="insertWrite('\\lambda', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb8"><a onmouseup="insertWrite('\\mu', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb9"><a onmouseup="insertWrite('\\rho', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb10"><a onmouseup="insertWrite('\\sigma', false);return false;" href="javascript:void(0);">&nbsp;</a></li>
						<li class="fb11"><a onmouseup="insertWrite('\\omega', false);return false;" href="javascript:void(0);">&nbsp;</a></li>    
					</ul>
					</div>
					</div>
					</div>
				</div>  
				<!--公示编辑器结束 -->
				 
				 <!--矩阵开始 -->
				<div id="box_div_editor_client1" class="toolbar-pop pop-formula1 jz jz_<?=$bank_num;?>" style="left: 680px; top: 40px; width: 130px; display: none;position:absolute;">
	                <span class="arrow"></span>
					<div id="div_MatrixBlock" class="menuDiv">
						<ul class="IMEMenu">
							<li class='hasIcon'><a href="javascript:void(0);" onmouseup='InsertMatrix(2,2)'><i class='icon im2'>&nbsp;</i>插入2*2矩阵</a></li>
							<li class='hasIcon'><a href="javascript:void(0);" onmouseup='InsertMatrix(3,3)'><i class='icon im3'>&nbsp;</i>插入3*3矩阵</a></li>
							<li class='hasIcon' style="display:none"><a id='btn_DeleteMatrix' href="javascript:void(0);"><i class='icon dim'>&nbsp;</i>删除当前矩阵</a></li>
						</ul>
					</div>
				</div>
				<!--矩阵结束 -->
	            
			</div>
			
			<?php include('Tpl/'.C('DEFAULT_THEME').'/paper/element/paper/banks_subject.php'); ?>
			
	       
	    
		</div>
		<layout name="element/paper/bank_foot" />
	</div>
	<!--简答题 end-->
		
		
		<?php else: ?>
	<!--非简答题 start-->
	<div class="bg-cold bank bank_num_<?=$bank_num;?>" bank_view_num_show="<?=$bank_view_num_show?>" bank_id="<?=$bank['id']?>" bank_type_id="<?=$bank['bank_type_id']?>" marktag="0" zoomIndex="0">
		<div class="exam-iframe-wrap">
			<div class="toolbar">
				<div class="tit">答题区</div>
					<span class="more"><span onclick="javascript:showCalc();">计算器</span></span>
			</div>
				
			<div class="question">
				<p><?=(($bank['bank_type_id'] == 5)?"":$bank_num_show."、").$bank['content']?></p>
			</div>
			
			<input type="hidden" id="bank_num_start_<?=$bank_num;?>" num_start="<?=$bank_num_show;?>" num_end="<?=($bank_num_show+count($bank['childs'])-1)?>" />
			<div class="user-opt">
				<ul class="list">
					<li><?php include('Tpl/'.C('DEFAULT_THEME').'/paper/element/paper/banks_unsubject.php'); ?></li>
				</ul>
			</div>
		</div>	
			
		<layout name="element/paper/bank_foot" />
	</div>
	<!--非简答题 end-->
		<?php endif; ?>
		
		<?php endforeach; ?>
		<!--循环试题 end-->
	<?php endforeach; ?>    
	<!--循环显示题型 end-->
	<!--记录试题等信息，为js服务-->
	<input type="hidden" id="info_now" iframe_num="0" zoomIndex="1" bank_num="1" />
	<input type="hidden" id="bank_num_total" bank_num_total=<?=$bank_num?> />
    
	
<layout name="element:foot2" />



</div>
<script type="text/javascript">
	
	
	
	var bank_num_total = parseInt(<?=$bank_num;?>);
	var saveAnswerUrl = "<?=U('paper/saveAnswer');?>";
	var overPaperUrl = "<?=U('paper/saveAllAnswer/from/'.$_SESSION['info']['from'])?>";
	var overPaperReturnUrl = "<?=U('menu/showMenus/cd_id/'.$_SESSION['cd_id']);?>";
	manualscoreUrl = "<?=U('paper/bank_manual_score/cd_id/'.$_SESSION['cd_id']);?>";
	var cd_id=parseInt(<?=$cd_id;?>);
	
	
	var restTime = parseInt(<?=$_SESSION['info']['datas']['paper']['mock_time']?>) * 60;
	var usedTime = 0;
	//考试时间计时
	function setTime(restTime,usedTime) {
		var rest_time_h = parseInt(restTime/3600);
		if (rest_time_h < 10) rest_time_h = '0'+rest_time_h;
		var rest_time_m = parseInt(restTime%3600/60);
		if (rest_time_m < 10) rest_time_m = '0'+rest_time_m;
		var rest_time_s = parseInt(restTime%3600%60);
		if (rest_time_s < 10) rest_time_s = '0'+rest_time_s;
		
		var rest_time = rest_time_h + ":" + rest_time_m + ":" + rest_time_s;
		
		$(".rest_time").html(rest_time);
		setTimeout(function() {
			if (restTime == 0)
			{
				alert("考试结束时间已到，请点击确定提交试卷！");
				$(".tc2").css("display","");
			}
			else
			{
				restTime -= 1;
				usedTime += 1;
				setTime(restTime,usedTime);
			}
			
		}, 1000)
	}
	
	if (restTime > 0)
	{
		setTime(restTime,usedTime);
	}
	
	
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', 'UA-32312747-1']);
		_gaq.push(['_trackPageview']);

		(function () {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		})();
	</script>