function ShowPannel(index,Max){
	for(var i=0;i<=Max;i++){
		document.getElementById("Pannel"+i).style.display="none";
		document.getElementById("PannelHeader"+i).className="PannelOff";
	}
	document.getElementById("PannelHeader"+index).className="PannelOn";
	document.getElementById("Pannel"+index).style.display="";
}
function doZoom(size){
	document.getElementById('textbody').style.fontSize=size+'px'
}
//更改文章背景颜色
function setColor(color_val){
document.getElementById('textbody').style.backgroundColor=color_val;
}
//改变图片大小
function resizepic(thispic)
{
if(thispic.width>700) thispic.width=700;
}
//无级缩放图片大小
function bbimg(o)
{
  var zoom=parseInt(o.style.zoom, 10)||100;
  zoom+=event.wheelDelta/12;
  if (zoom>0) o.style.zoom=zoom+'%';
  return false;
}
//双击鼠标滚动屏幕的代码
var currentpos,timer;
function initialize()
{
timer=setInterval ("scrollwindow ()",30);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos !=document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize

//更改字体大小
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
  if(curfontsize>8){
    document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';
	document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';
  }
}
function fontZoomB(){
  if(curfontsize<64){
    document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';
	document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';
  }
}
function runCode(obj){
    var winname = window.open("", "_blank","resizable=yes,scrollbars=yes,status=yes");
    winname.document.open("text/html", "replace");
    winname.document.writeln(obj.value);
    winname.document.close();
}
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
  }
} 
}
function CopyInBoard(share_input){ 			
	document.getElementById(share_input).select();
	window.clipboardData.setData('text',document.getElementById(share_input).value)
	alert('网址复制完成，您可以通过QQ、MSN、邮件等方式发送给您的好友，共同分享阅读的快乐！');
}