<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$CONFIG[charset]}" />
<meta name="keywords" content="{$tags}" />
<meta name="description" content="{$description}" />
<meta name="author" content="{$SYSTEM[sitename]}" />
<meta name="Copyright" content="{$SYSTEM[sitename]}版权所有" />
<title>打印_{$title}_{$SYSTEM[sitename]}</title>
<style type="text/css">
body{ margin:0 auto; padding:0; background:#FFF; font:14px '宋体'; text-align: center; }
a{ color: #06c; }
a:hover{ color: #f00; }
select,input{ vertical-align: middle;}
</style>
<style type="text/css" media="screen">
	/*顶部样式*/
	a{ text-decoration: none;}
	.printtop{ width: 100%; height: 45px; padding-top: 10px; display: block; text-align: center; background-image: url({IMG_URL}templates/{TEMPLATE}/css/images/print-top.jpg);}
	.printtop span{ margin: 0 14px;}
	.zihaosmall,.zihaomidding,.zihaobig{margin: 0 2px; cursor: pointer; color: #06c; font-style: normal; font-weight: bold;  font-size: 14px;}
	.zihaomidding{ font-size: 16px; }
	.zihaobig{ font-size: 20px; }
	.current{color: #ccc; cursor: text; text-decoration: none; }
	.startprint{ vertical-align: middle;}
	
	/* 内容样式  */
	.content{ margin: 30px auto; padding: 16px; border: 1px solid #ccc; text-align: left; }
	.content .c-logo{padding-bottom: 16px; border-bottom: 1px solid  #666; text-align: left;}
	.content h1{ font-size: 22px; font-family: Microsoft YaHei,SimHei; font-weight: normal;}
	.content p{ text-align: left; text-indent: 2em;}
	.content p.position{ font-size: 12px;  text-indent: 0; color: #333; margin: 4px 0; }
	.content .title{padding-bottom: 6px;  border-bottom: 1px dotted #666; text-align: left; }
	.content .title h1{ text-align: center;}
	.content .relinfo{ font-size: 12px; }
	.content .center{ text-align: center;}
	.content .from{ font-size: 12px; text-align: right; color: #666; }
	.post-time{ text-align: left; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif; }
	.content p.print-bj{ color: #666; text-align: right;}
	.cont-wrap p.p_img{ text-align: center; text-indent: 0;}
	#vote dl dt,#vote dl dd{ text-align: left;}
	.line-h24 p{ line-height: 24px; }
	.line-h26 p{ line-height: 26px; }
	.line-h28 p{ line-height: 28px; }
	
	.w-a4{ width: 596px;  }
	.w-a3{ width: 958px;  }
</style>
<style type="text/css" media="print">
	body{ font-size: 14pt; font-family: '宋体';}
	.printtop{ display: none; visibility: hidden; }
	.content{ width: 96%; padding: 16pt; }
	.content .c-logo{padding-bottom: 16pt; border-bottom: 1pt solid  #333; text-align: left; }
	.content h1{ font-size: 22pt; font-family: Microsoft YaHei,SimHei; font-weight: normal; }
	.content p{ text-align: left; text-indent: 2em;}
	.content p.position{  text-indent: 0; color: #333; margin: 4px 0; }
	.content .title{padding-bottom: 20pt;  border-bottom: 1pt dotted #666; }
	.content .relinfo,.content .from,.content p.position{ font-size: 12pt; }
	.content .center{ text-align: center;}
	.content a{ text-decoration: underline; }
</style>
<!-- A3（285*420mm） , A4（210*285mm）-->
<script type="text/javascript">
function doPrint() {   
	bdhtml=window.document.body.innerHTML;   
	sprnstr="<!--startprint-->";   
	eprnstr="<!--endprint-->";   
	prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);   
	prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));   
	window.document.body.innerHTML=prnhtml;   
	window.print();   
}    
</script>
<script type="text/javascript" src="{IMG_URL}js/config.js"></script>
<script type="text/javascript" src="{IMG_URL}js/lib/jquery.js"></script>
</head>

<body><!--startprint-->
	<div class="printtop">
		<span>打印纸张
		<select id="paper" onchange="changeSize(this)">
			<option selected="selected" value="A4">A4</option>
			<option value="A3">A3</option>
		</select>
		</span>
		<span class="zihao">字号选择：<em class="zihaosmall current" onclick="changeFont(this)">小</em><em class="zihaomidding" onclick="changeFont(this)">大</em><em class="zihaobig" onclick="changeFont(this)">超大</em></span>
		<span class="lineheight">行高
		<select id="lineHeight" onchange="changeLh(this)">
			<option selected="selected" value="24">24px</option>
			<option value="26">26px</option>
		</select>
		</span>
		<span class="isimg"><input type="checkbox" checked="checked" onclick="havePic(this)"/>带图打印 </span>
		<span><img class="startprint" src="{IMG_URL}templates/{TEMPLATE}/css/images/print-btn.gif" alt="" onclick="doPrint()" /></span>
		<span><a href="{$url}">返回原文</a></span>
	</div>
	
	<div id="content" class="content w-a4">
		<div class="c-logo">
			<img src="{IMG_URL}templates/{TEMPLATE}/css/images/print-logo.jpg" alt="" />
		</div>
		<p class="position">首页  > {loop $pos $cat}
		<span>{$cat[name]}</span> 
		{/loop}</p>
		<div class="title">
			<h1>{$title}</h1>
			<!--{if $source_name}-->
			<span class="relinfo f-r">来源：{$source_name}</span>
			<!--{/if}-->
			<span class="post-time f-l">{date('Y年m月d日 H:i', $published)} </span>
		</div>
		<div class="cont-wrap" style="line-height:26px">
		{$content}
		<p class="txt-r f-r fs-12 cor-999 print-bj">责任编辑：{$editor}</p>
		<p class="from f-l">文章来源：{$url}</p>
		</div>
	</div>
	<!--endprint-->
<script type="text/javascript">

$(function(){
	var positions = $('.position span');
	positions.each(function(k){
		if(k==positions.length-1) return;
		$(this).after('&nbsp;>');
	})
})
function changeFont(t){
	$('.zihao em').removeClass('current');
	$(t).addClass('current');
	var fsize = '';
	switch(t.innerHTML){
		case '小':fsize = '14px';break;
		case '大':fsize='16px';break;
		case '超大':fsize='20px';
	}
	$('.cont-wrap').css('font-size',fsize);
}
function changeLh(t){
	$('.cont-wrap').css('line-height',$(t).val()+'px');
}

var content = '';//全文缓存
function havePic(t){
	if($(t).attr('checked')){
		$('.cont-wrap').html(content);
	}
	else{
		content = content==''?$('.cont-wrap').html():content;
		$('.cont-wrap')[0].innerHTML =  $('.cont-wrap').html().replace(/<img\s*[^>]*[\/]?>/img,'');
	}
}

function changeSize(t){
	var wid = $(t).val()=='A3'?'998px':'596px';
	$('#content').css('width',wid);
}
</script>
</body>
</html>
