
/* font size changer */
function doZoom(obj_target,size){
document.getElementById(obj_target).style.fontSize=size+"px";
}


/* relatedLink checker */
function relatedLink_checker(){
	var relatedLinks_cont=document.getElementById("chan_relatedLink").innerHTML;
	if (relatedLinks_cont.indexOf("<br>")==-1 && relatedLinks_cont.indexOf("<BR>")==-1){
		document.getElementById("chan_relatedLink").style.display="none";
	}
}


/* detail pic fixer */
function picSizeFixer(){
  var doc=document.getElementById("chan_newsDetail").getElementsByTagName("img");
  for (i=0;i<doc.length;i++){
      var imgLink=doc[i].src;
	  var bigImgLink=imgLink.replace(/r_|_S/g,"");
      if (navigator.appName=="Microsoft Internet Explorer"){
        doc[i].setAttribute("title","点击查看原图");
        doc[i].onclick=function(){window.open('/zh_cn/etc/endpage/showPic.html?'+bigImgLink);}
        doc[i].onmouseover=function(){this.style.cursor="pointer";}
        }
      else {
        doc[i].setAttribute("title","点击查看原图");
        doc[i].setAttribute("onclick",'window.open("/zh_cn/etc/endpage/showPic.html?'+bigImgLink+'","")');
		doc[i].onmouseover=function(){this.style.cursor="pointer";}
        }
    if (doc[i].width>500){
      doc[i].width=500;
      }
    }
  }

/* onload functions*/
function onload_function(){
	relatedLink_checker();
	picSizeFixer();
}
