<!--
//图片按比例缩放
var flag=false;
function AutoSmallImg(ImgD){
var image=new Image();
var iwidth = 600; //定义允许图片宽度
var iheight = 1000; //定义允许图片高度
image.src=ImgD.src;if(image.width>0 && image.height>0){flag=true;if(image.width/image.height>= iwidth/iheight){if(image.width>iwidth){ImgD.width=iwidth;ImgD.height=(image.height*iwidth)/image.width;}else{ImgD.width=image.width; ImgD.height=image.height;}}else{if(image.height>iheight){ ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height; }else{ImgD.width=image.width; ImgD.height=image.height;}}}} 
//-->

<!--
//图片按比例缩放
function AutoSmallImg2(ImgD){
var image=new Image();
var iwidth = 500; //定义允许图片宽度
var iheight = 800; //定义允许图片高度
image.src=ImgD.src;if(image.width>0 && image.height>0){flag=true;if(image.width/image.height>= iwidth/iheight){if(image.width>iwidth){ImgD.width=iwidth;ImgD.height=(image.height*iwidth)/image.width;}else{ImgD.width=image.width; ImgD.height=image.height;}}else{if(image.height>iheight){ ImgD.height=iheight;ImgD.width=(image.width*iheight)/image.height; }else{ImgD.width=image.width; ImgD.height=image.height;}}}} 
//-->


function getObject(objectId) {
 if(document.getElementById && document.getElementById(objectId)) {
 // W3C DOM
 return document.getElementById(objectId);
 }
 else if (document.all && document.all(objectId)) {
 // MSIE 4 DOM
 return document.all(objectId);
 }
 else if (document.layers && document.layers[objectId]) {
 // NN 4 DOM.. note: this won't find nested layers
 return document.layers[objectId];
 }
 else {
 return false;
 }
}

//========================= 设定文章字体 =============
//print js begin

function FontResize(objname,fs)
{
	var obj = getObject(objname);
	obj.style.fontSize=fs+"px";
}


//========================= 打印正文部分 start =============
//print js begin

function LoadPrintJsCallBack()
{
   if(typeof forSPrint == "object" && forSPrint.Print)
   {
    forSPrint.Print();
   }
}

function SinaPrintGetBrowser(){
   if (navigator.userAgent.indexOf("MSIE") != -1)
   {
    return 1;
   }
   else if (navigator.userAgent.indexOf("Firefox") != -1)
   {
    return 2;
   }
   else if (navigator.userAgent.indexOf("Navigator") != -1)
   {
    return 3;
   }
   else if (navigator.userAgent.indexOf("Opera") != -1 )
   {
    return 4;
   }else
   {
    return 5;
   }
}

function LoadPrintJs()
{
   var myBrowser = SinaPrintGetBrowser();

   if(myBrowser == 1)
   {
    var js_url = "JISU_js/print.js";
    var js = document.createElement( "script" ); 
    js.setAttribute( "type", "text/javascript" );
    js.setAttribute( "src", js_url);
    js.setAttribute( "id", "sinaPrintJsUrl");
    document.body.insertBefore( js, null);
    document.getElementById("sinaPrintJsUrl").onreadystatechange = LoadPrintJsCallBack;
   }
   else
   {
    var js_url = "JISU_js/print.js";
    var js = document.createElement( "script" ); 
    js.setAttribute( "type", "text/javascript" );
    js.setAttribute( "src", js_url);
    js.setAttribute( "id", "sinaPrintJsUrl");
    js.setAttribute( "onload", "LoadPrintJsCallBack()");
    document.body.insertBefore( js, null);     
   }
}
