// 设置字体大中小
function doZoom(size){
	var textp = document.getElementById("textp");
	if(!textp){
		return;
	}
	var textpChild = textp.childNodes;
	textp.style.fontSize = size + "px";
	//再对textp div内的直接html节点设置fontSize属性
	for(var i = 0; i < textpChild.length; i++){
		if(textpChild[i].nodeType == 1){
			textpChild[i].style.fontSize = size + "px";
		}
	}

}

// 打印正文部分
function LoadPrintJsCallBack(){
  if(typeof forSPrint == "object" && forSPrint.Print){
    forSPrint.Print();
  }
}
function LoadPrintJs(){
  var jsFile = "http://www.zjtv315.com/js/print2.js";  //打印主js文件url
  jsFile += "?t="+ (new Date()).getTime();
  var js = document.createElement("script");
  js.setAttribute("src",jsFile); 
  js.setAttribute("type","text\/javascript");
  js.setAttribute( "id", "sinaPrintJsUrl");
  //for ie
  js.onreadystatechange = function(){
  if(js.readyState=="loaded"){
     LoadPrintJsCallBack();
  }
};
//for ff
js.onload = LoadPrintJsCallBack;
  document.body.insertBefore(js,null); // null for ff
}

// 评论iframe高度自适应
function SetCwinHeight(iframeObj){
if (document.getElementById){ 
  if (iframeObj){
    if (iframeObj.contentDocument && iframeObj.contentDocument.body.offsetHeight){
      iframeObj.height = iframeObj.contentDocument.body.offsetHeight;
      } else if (document.frames[iframeObj.name].document && document.frames[iframeObj.name].document.body.scrollHeight){  iframeObj.height = document.frames[iframeObj.name].document.body.scrollHeight;
      }
    }
  }
}

