//平滑滚动到顶部
toTop = {
	init:function(){
		document.getElementById("toTop").onclick=function(e){
			toTop.set();
			return false;
		}		
	},
	waitTimer:null,
	set:function(){
		var d_st=document.documentElement.scrollTop;
		if(window.navigator.userAgent.indexOf("MSIE")>=1){
			for (var i=d_st; i>10; i-=Math.floor(i/6)){
			window.scrollTo(0,i);
			}
			window.scrollTo(0,10);
		}
		else{
		window.scrollTo(0,Math.floor(d_st / 2));
		
		 if(d_st>10){
				 waitTimer=setTimeout("toTop.set()",40);
		  }
			else{
				  clearTimeout(waitTimer);
			}
		}
	}
}
window.onload = function(){toTop.init();}


lastScrollY=0;
function heartBeat(){ 
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
    diffY = document.documentElement.scrollTop;
else if (document.body)
    diffY = document.body.scrollTop
else
    {/*Netscape stuff*/}

percent=.1*(diffY-lastScrollY); 
if(percent>0)percent=Math.ceil(percent); 
else percent=Math.floor(percent); 
document.getElementById("full").style.top=parseInt(document.getElementById("full").style.top)+percent+"px";

lastScrollY=lastScrollY+percent; 
}
suspendcode="<div id=\"full\" style='right:0px; top:400px; position:absolute;z-index:1000'><table width='20' border='0' cellpadding='0' cellspacing='0'><tr><td align='center'><a id='toTop' href='#top'><img border='0' src='images/icon_top.gif' alt='tOP' /></a></td></tr><tr><td align='center'><iframe name='QQR' width='0' height='0' frameborder='0' hspace='0' vspace='0'></iframe></iframe><img style='CURSOR:pointer' onclick=\"javascript:window.open('tencent://message/?uin=287992009&Site=www.kaoqin5.cn&Menu=yes','QQR');\" border='0' src='images/icon_oicq.gif' title='购买咨询'/></td></tr><tr><td align='center'><a href='mailto:admin@kaoqin5.cn' target='blank' title='Email:admin@kaoqin5.cn'><img border='0' src='images/icon_email.gif' /></a></td></tr><tr><td align='center'><img style='CURSOR:pointer' onclick=\"javascript:window.open('tencent://message/?uin=287992009&Site=www.kaoqin5.cn&Menu=yes','QQR');\" border='0' src='images/icon_oicq.gif' title='商业服务'/></td></tr><tr><td align='center'><a href='#bottom'><img border='0' src='images/icon_bottom.gif' alt='bOTTOM' /></a></td></tr></table></div>"

document.write(suspendcode);
window.setInterval("heartBeat()",1);
