<?php $upper=C('UPPER_NUM');$bank_num=0; foreach ($_SESSION['info']['childs']['bank_view'] as $k=>$v): ?>
<?php if ($v['childs']): ?>
	<?php
		$num=0;
		foreach($v['childs'] as $cv)
		{
			$num+=$cv['scoreinfo']['total_num'];
		}
		if ($num):
	?>
	
	<?php $bank_show_num = 0; ?>
	<div class="jx_sjtitle"><?=$upper[++$k].'、'.$v['title']; ?></div>
	<div class="jx_tmtit"><?=$v['remark']?"（".$v['remark']."）":""; ?></div>
	<?php foreach ($v['childs'] as $cv): ?>
		
		<?php foreach ($cv['bank_ids'] as $cbankid): ?>
			<?php $bank_num++; $bank_show_num++; $bank = $_SESSION['info']['childs']['banks'][$cbankid]; ?>
			<?php include('Tpl/'.C('DEFAULT_THEME').'/paper/element/record/banks_switch.php'); ?>
		<?php endforeach; ?>
		
	<?php endforeach; ?>
	</ul>
	<?php endif; ?>

<?php else: ?>
	<!--判断是否有题-->
	<?php if ($v['score_info']['total_num']): ?>
	<?php $bank_show_num = 0; ?>
	<div class="jx_sjtitle"><?=$upper[++$k].'、'.$v['title']; ?></div>
	<div class="jx_tmtit"><?=$v['remark']?"（".$v['remark']."）":""; ?></div>
		<?php foreach ($v['bank_ids'] as $bankid): ?>
			<?php $bank_num++; $bank_show_num++; $bank = $_SESSION['info']['childs']['banks'][$bankid]; ?>
			<?php include('Tpl/'.C('DEFAULT_THEME').'/paper/element/record/banks_switch.php'); ?>
		<?php endforeach; ?>
	</ul>
	<?php endif; ?>
	
	
<?php endif; ?>

<?php endforeach; ?>


<script type="text/javascript">
$(document).ready(function() {
	$(".smallfont").hide();
	
	$(".bigfont").click(function(){
		$('.mainrightn').css('font-size','15px');
		$(this).hide();
		$(".smallfont").show();
	});
	$(".smallfont").click(function(){
		$('.mainrightn').css('font-size','12px');
		$(this).hide();
		$(".bigfont").show();
	});
	
	$(".nav_").click(function() {
		var key = $(this).attr('key');
		if ($(".sec_nav_"+key).css("display") != 'none') {
			$(".sec_nav_"+key).css("display","none");
		} else {
			$(".sec_nav_"+key).css("display","");
		}
	});
	$(".nav").click(function() {
		var tag = '';
		$(".nav_").each(function() {
			var key = $(this).attr('key');
			if ($(".sec_nav_"+key).css("display") != 'none') {
				tag = 'none';
			}
		});
		$(".nav_").each(function() {
			var key = $(this).attr('key');
			$(".sec_nav_"+key).css("display",tag);
		});
	});
});


var hkey_root,hkey_path,hkey_key;
	hkey_root="HKEY_CURRENT_USER";
	hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
function pagesetup_null() {
	try {
		var RegWsh = new ActiveXObject("WScript.Shell")
		hkey_key = "header"
		RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")
		hkey_key = "footer"
		RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")
	} catch (e) {}
}

function printdiv(printpage)
{
	//pagesetup_null();
	var headstr = "<html><head><title>注会机考模拟系统</title></head><body>";
	var footstr = "</body></html>";
	$('.mainrightn').css('height','auto');
	$('.mainrightn').css('position','absolute');
	var newstr = document.all.item(printpage).innerHTML;
	var oldstr = document.body.innerHTML;
	document.body.innerHTML = headstr+newstr+footstr;
	window.print();
	parent.location.reload();
	/*
	document.body.innerHTML = oldstr;
	$('.mainrightn').css('position','relative');
	$('.mainrightn').css('height','460px');
	*/
}
</script>