<%@ page contentType="text/html;charset=UTF-8"%>
<link rel="stylesheet" type="text/css" href="${ctxStatic}/jBox/Source/jBox.css">
<script type="text/javascript" src="${ctxStatic}/jBox/Source/jBox.min.js"></script>
<script type="text/javascript">
var imageModal = new jBox('Modal');
$(document).ready(function() {
	//$('#sheet-view-content').find('object').each(function(index, obj){
		//obj.width = $(window).width()*0.4;
		//obj.height = $(window).height()*0.83;
	//});
	$('#left-answer-div').find('iframe').height($(window).height()*0.83);
});
function initImagePopover(title, imageServer, imageUrl) {
	//if(imageModal!=undefined){
	//	imageModal.destroy();
	//}
	initImagePopoverContent(imageServer, imageUrl.split(','));

	imageModal.setWidth($(window).width()*0.9);
	imageModal.setHeight($(window).height()*0.85);
	imageModal.setTitle(title);
	imageModal.setContent($('#image-view-content'));
	imageModal.open();
}
function initImagePopoverContent(imageServer, imageUrls){
	$('#image-nav, #image-content').empty();
	for(var i=0;i<imageUrls.length;i++){
		var url = imageServer+imageUrls[i];
		$('#image-nav').append('<li><a href="#image_'+i+'" data-toggle="tab">第'+(i+1)+'页</a></li>');
		$('#image-content').append('<div class="tab-pane fade" id="image_'+i+'"><img src="'+url+'"/></div>')
	}
	$('#image-nav a:first').trigger('click');
}
</script>
<div id="image-view-content" class="container-fluid" style="display:none">
	<div class="row-fluid">
		<div class="span12">
			<ul id="image-nav" class="nav nav-tabs">
			</ul>
			<div id="image-content" class="tab-content">
			</div>
		</div>
	</div>
</div>