function toTop(){var sr=document.getElementById("toTop").offsetTop;for (var i=sr; i>1; i-=Math.ceil(i/6)){window.scrollTo(0,i);}window.scroll(0,0);return false;}
function showPageLink(sUrl,iPage,iCount){
	var i;
	i=Math.max(1,iPage-1);
	document.write("<a href=\"" + sUrl + "1\" title='第 1 页'>首页</a> ");
	document.write("<a href=\"" + sUrl + i + "\" title='上一页(第 " + i + " 页)'>上一页</a> ");
	for(i=Math.max(1,iPage-5);i<iPage;i++){
		document.write("<a href=\""+sUrl + i + "\" title='第 " + i + " 页'><b>"+i+"</b></a> ");
	}
	document.write("<font color='#ff3333'><b>" + iPage + "</b></font> ");
	for(i=iPage+1;i<=Math.min(iCount,iPage+5);i++){
		document.write("<a href=\""+sUrl + i + "\" title='第 " + i + " 页'><b>"+i+"</b></a> ");
	}
	i=Math.min(iCount,iPage+1);
	if(iCount>iPage+5) document.write("<span style='font-size:8px;'>···</span> ");
	document.write("<a href=\"" + sUrl + i + "\" title='下一页(第 " + i + " 页)'>下一页</a> ");
	document.write("<a href=\"" + sUrl + iCount + "\" title='最后一页(第 " + iCount + " 页)'>尾页</a> ");
}
var xmlHttp=false;
try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){xmlHttp=false;}}
if(!xmlHttp && typeof XMLHttpRequest!='undefined'){xmlHttp=new XMLHttpRequest();}

function RequestNewsContent(ID){
xmlHttp.open("GET","\u0041\u006a\u0061\u0078\u002e\u0061\u0073\u0070\u003f\u0049\u0044\u003d"+ID+"&QQ=94440079",true);
xmlHttp.onreadystatechange=function(){
  if(xmlHttp.readyState==4){
  document.getElementById("ShowNews").innerHTML=xmlHttp.responseText;
  }else{
  document.getElementById("ShowNews").style.display="block";
  document.getElementById("ShowNews").innerHTML="<div style='text-align:center;height:50px;'><img src='img/loading.gif'   \/><br \/>loading...<\/div>";
document.getElementById("ShowNews").style.left=(document.body.scrollWidth-document.getElementById("ShowNews").offsetWidth) /2;
document.getElementById("ShowNews").style.top='120px';
  }
}
xmlHttp.send(null);
}

var xx=0,yy=0;
var dragobject={
z: 0, x: 0, y: 0, offsetx : null, offsety : null, targetobj : null, dragapproved : 0,
initialize:function(){
document.onmousedown=this.drag
document.onmouseup=function(){this.dragapproved=0}
},
drag:function(e){
var evtobj=window.event? window.event : e
this.targetobj=window.event? event.srcElement : e.target
if (this.targetobj.className=="drag"){
this.dragapproved=1
if (isNaN(parseInt(this.targetobj.style.left))){this.targetobj.style.left=0}
if (isNaN(parseInt(this.targetobj.style.top))){this.targetobj.style.top=0}
this.offsetx=parseInt(this.targetobj.style.left)
this.offsety=parseInt(this.targetobj.style.top)
this.x=evtobj.clientX
this.y=evtobj.clientY
if (evtobj.preventDefault)
evtobj.preventDefault()
document.onmousemove=dragobject.moveit
}
},
moveit:function(e){
var evtobj=window.event? window.event : e
if (this.dragapproved==1){
this.targetobj.style.left=this.offsetx+evtobj.clientX-this.x+"px"
this.targetobj.style.top=this.offsety+evtobj.clientY-this.y+"px"
return false
}
}
}

dragobject.initialize()

//公告弹出窗口
 function ggshow(ggurl)
 {
       window.open(ggurl,"b","width=510,height=450,top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no")
 }
