/*----------------------------------------------------------
  -- 目的： 打印任何内容
  -- 输入： s 需要打印的内容字符串
-----------------------------------------------------------*/ 
function printany(s) {
	if (s=="") return; 
	var sTitle=document.title;
	sTitle=sTitle.split("-");
	sTitle=sTitle[0];
	win=window.open('','print','height=500,width=780,menubar=no,status=0,titlebar=0,toolbar=0,scrollbars=1');
	win.document.clear();
	win.document.write("<title>"+sTitle+"</title>");
	win.document.write('<link rel="stylesheet" type="text/css" href="/css/print.css">');
	win.document.write("<body bgcolor='white' onload="+'"'+"setTimeout('self.close()',10*1000)"+'">');
	win.document.write(s);
	win.document.write("</body>");
	win.document.close();
	win.print();
}

/*----------------------------------------------------------
  -- 目的： 构建需要打印的内容
  -- 输入： s 需要打印的内容字符串,sC 标题
-----------------------------------------------------------*/ 
function printpg(s) {
	var sTitle=document.title;
	var argv = printpg.arguments;  
	var nArg = printpg.arguments.length;  
	var sC = (nArg >1) ? argv[1] : document.title.split("-")[0];
	if (s==null && ContentArea!=null) s=ContentArea.innerHTML;
	sTitle='<table align="center" width="98%"><tr><td>'+ sTitle
			+'</td><td  align="right">http://'+window.location.hostname+'</td></tr>';
	sTitle+='<tr><td colspan="2"><hr size="1"></td></tr></table>' ;
	var sStr='<table align="center" width="98%" border="0" align="center">'
			 +'<tr><td>'
		 	 +s
		  	 +"</td></tr></table>";
	sStr=sTitle+'<br><P align="center"><font size="+1">'+sC+'</font></p>' + sStr;
	printany(sStr);
}

/*----------------------------------------------------------
  -- 目的：导出数据-详细
  -- 输入：frm 表单,s 配置参数
-----------------------------------------------------------*/ 
function expdata() {
	frmExpData.sExpData.value=ContentArea.innerHTML;
	frmExpData.submit();	
}

