function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft}return[scrOfX,scrOfY]}
var isnav=0,cp_l=0,cp_t=0;
var vp=Math.round((1150-screen.height)/2)+150;
var pm=Array(49,944,2030,3138,4394,5545,6829,9032-screen.height+200);
var am=Array();
var br=(navigator.appName=="Microsoft Internet Explorer")?1:0;
function SNavigate_a(p){ml=getScrollXY()[0];mv=getScrollXY()[1];e=0;if(!e&&ml==cp_l&&mv==cp_t){if(p==0||p==7)step=pm[7-p]-mv;else step=pm[7-p]-mv+vp;if(Math.abs(step)>300){step=50*step/Math.abs(step)}else step=step/6;mv+=step;cp_l=getScrollXY()[0];cp_t=Math.round(mv);if(Math.abs(pm[7-p]-ml)>1&&Math.abs(step)>0.5){mv=Math.round(mv);window.scrollTo(cp_l,mv);setTimeout("SNavigate_a("+p+")",25)}else{ml=pm[7-p]+vp;e=1}}else e=1;if(e){isnav=0;tp=p}}
function SNavigate(p){if(!isnav){cp_l=getScrollXY()[0];cp_t=getScrollXY()[1];isnav=1;b1();setTimeout("SNavigate_a("+p+")",100)}return false}
function getClientHeight(){if(document.compatMode&&document.compatMode=='CSS1Compat'&&!window.opera)return document.documentElement.clientHeight;else return document.body.clientHeight}
isfly=0;b_t=8060;k=0;t=setTimeout('',0);
function b(m){isfly=1;b_t1=parseInt(b_t1);m_t=getScrollXY()[1];if(m>8070)m=8070;if(m<40)m=40;if(c_t==m_t){step=m-b_t1;if(k<1)k+=0.1;if(Math.abs(step)>2000){step=500*step/Math.abs(step)*k}else if(Math.abs(step)>1000){step=200*step/Math.abs(step)*k}else if(Math.abs(step)>500){step=25*step/Math.abs(step)*k}else step=step/20*k;if(Math.abs(b_t1-m)>10&&Math.abs(step)>0.1){b_t1+=Math.round(step);if(br)document.getElementById("balloon").style.pixelTop=(b_t1-20);else document.getElementById("balloon").style.top=(b_t1-20)+'px';setTimeout("b("+m+")",40)}else{isfly=0}}else{isfly=0;b1()}}
function b1(){c_t=getScrollXY()[1];if(br)b_t1=document.getElementById("balloon").style.pixelTop;else{if(!document.getElementById("balloon").style.top)b_t1=0;else b_t1=parseInt(document.getElementById("balloon").style.top)}k=0;clearTimeout(t);t=setTimeout("b(getScrollXY()[1]-"+vp+"+100)",300)}
window.onscroll=function(){if(!isfly&&!isnav)b1()}
wh=0;
function standdown(){window.scrollTo(0,9000);if(wh==0){wh=0;if(wh>0){wh-=10;if(wh>220)wh=220;for(i=0;i<=7;i++){if(document.getElementById("ar_u"+i)){}if(document.getElementById("ar_d"+i)){}}}}}
window.onload=function(){for(var i=0,a=document.getElementsByTagName('A'),l=a.length;i<l;++i){if(a[i].className=='scroll-up'||a[i].className=='scroll-down'){a[i].onclick=function(){SNavigate(this.href.substr(this.href.length-1));return false}}}standdown()}
document.write('<div id="loading"></div>');
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func}else{window.onload=function(){if(oldonload){oldonload()}func()}}}
addLoadEvent(function(){document.getElementById("loading").style.display="none"});
