function writeAJS(id,str){
    try{
        var obj=document.getElementById(id);
        if(obj && obj!=null) obj.innerHTML=str;
     }
    catch(ee){
    }
}
String.prototype.insertAt=function(loc,strChunk){  return (this.valueOf().substr(0,loc))+strChunk+(this.valueOf().substr(loc))}
function format_page_info(){
	if (document.getElementById("_function_code_page"))
	{
    c=document.getElementById("_function_code_page");
	c.id="fanye";
	re = /\[|\]/gi;
	str=c.innerHTML.replace(re, "");
	re1 = /align=right/;
	str=str.replace(re1, "align=center");		
	c.innerHTML=str;
	}
	
	
	
}
 function copyToClipBoard(){	
   var clipBoardContent=''; 
   clipBoardContent+=window.document.title;
   clipBoardContent+='\r\n';
   clipBoardContent+=document.location;
   window.clipboardData.setData("Text",clipBoardContent);
   alert("复制成功，请粘贴到你的QQ/MSN上推荐给你的好友");
  }
function doZoom(size){	
	var obj = document.getElementById("wzbody");
	var pobj=obj.getElementsByTagName("p");
	var aobj=obj.getElementsByTagName("a");
	
	for (i=0;i<pobj.length ;i++ )
	{
	 pobj[i].style.fontSize=size+"px";	 
	}
	for (j=0;j<aobj.length ;j++ )
	{
	 aobj[j].style.fontSize=size+"px";
	}
}
function addBookmark() {
title= window.document.title;
url = document.location;
if (window.sidebar) {
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
function showtime()
{
var today,hour,second,minute,year,month,date;
var strDate ;
today=new Date(); 
year = today.getYear();
if (year < 1900) { year+=1900; } 
month = today.getMonth()+1;
date = today.getDate();
hour = today.getHours();
minute =today.getMinutes();
second = today.getSeconds();
document.getElementById('datetime').innerHTML ="Date： "+year+"年"+month+"月"+date+"日" + "  " + hour + ":" + minute + ":" + second;
in_ID = setTimeout("showtime();", 1000);
}
function doPrint(){
	clearTimeout('in_ID');
	var ot=document.getElementById('wztitle');
    otitle=ot.innerHTML;
	var ob=document.getElementById('wzbody');
	obody=ob.innerHTML;
	var cb=document.getElementsByTagName('body');
	cb[0].innerHTML=otitle+"<hr><div style=\"text-align:left;line-height:18px;font-size:14px;\">"+obody+"</div>";
	cb[0].style.textAlign='center';	
	cb[0].style.margin='10px 100px 0 100px';	
	window.print();	
}
