<div class="layout banks_list">
	<!--记录试题等信息，为js服务-->
	<div class="header">
		<div id="bank_view_title" class="h_left">：第<span>1-2</span>题目</div>
		<div class="h_right">考试剩余时间：<span id="countdown" class="red rest_time"></span></div>
	</div>
	
	
	
	
	
	
	
	
	
	
	<div class="bg-cold">
		<input type="hidden" id="paper_info_now" iframe_num=0 zoomIndex=1>
		<?php $upper_nums = C('UPPER_NUM'); ?>
		<?php $bank_view_num = $bank_num = $iframe_num = 0;?>
		<?php foreach ($_SESSION['info']['datas']['childs'] as $conf): ?>
		<div class="exam-iframe-wrap bank_view bank_view_num_<?=++$bank_view_num;?>" bank_view_title="<?=$conf['title']?>" bank_num_start="<?=($bank_num+1);?>" >
			<div class="toolbar">
				<div class="tit">答题区</div>
				<span style=" background:none" class="more"><span unselectable="on" onmousedown="javascript:void(0);" class="mark"><i class="icon-flag"></i>标记</span><span unselectable="on" onmousedown="javascript:void(0);" class="removemark"><i class="icon-flag-c"></i>取消标记</span><span id="zoomb" class="zoomb" unselectable="on" onclick="zoomBig('top');" style=""><i class="icon-zoom-in"></i>放大窗口</span><span id="zooms" class="zooms" style="display: none;" unselectable="on" onclick="javascript:zoomSml('top');"><i class="icon-zoom-out"></i>恢复窗口</span></span>
			</div>
			
			<?php $bank_show_num = $upper_num_key =0; ?>
			<?php foreach ($conf['bankids'] as $bankid): ?>
			
			<div class="bank bank_num_<?=++$bank_num;?>" bank_view_id="<?=$conf['id']?>" bank_view_num="<?=$bank_view_num;?>" bank_id="<?=$bankid;?>" bank_num="<?=$bank_num;?>" bank_type_id="<?=$_SESSION['info']['banks'][$bankid]['bank_type_id']?>" >
				<div id="question" class="question srk">
					<?php if ($_SESSION['info']['banks'][$bankid]['bank_type_id'] == 5): ?>
					<p><?="（".$upper_nums[++$upper_num_key]."）、".$_SESSION['info']['banks'][$bankid]['content']?></p>
					<?php else: ?>
					<p><?=++$bank_show_num."、".$_SESSION['info']['banks'][$bankid]['content']?></p>
					<?php endif; ?>
					
				</div>
				
				
				<?php $bank = $_SESSION['info']['banks'][$bankid]; ?>
				<div class="user-opt" style="overflow-y:auto;height:279px;">
					<ul class="list"><?php include('Tpl/'.C('DEFAULT_THEME').'/paper/element/paper/banks_switch.php'); ?></ul>
				</div>
			</div>
			<?php endforeach; ?>
			
		</div>
		<?php endforeach; ?>
		
		<layout name="element/paper/bank_foot" />
		
	</div>
	
	<layout name="element:foot2" />
</div>


<layout name="element/paper/calc" />
<layout name="element/paper/overpaper" />
<layout name="element/paper/userinfo" />
<div class="flash_bank" style="display:none;"></div>

<div class="tc1" style="display:none"></div>

<div id="cover" style="display:none"> 
	<div id="tb_window"><div class="wait"><img src="__PUBLIC__/<?=C('DEFAULT_THEME')?>/images/wait.gif"></div> <img src="__PUBLIC__/<?=C('DEFAULT_THEME')?>/images/waitfor2.png"></div>
	<div class="mk_botbg"></div> 
</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']);?>";
	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>