var WindowLowerLimit=175;
if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
var ieversion=new Number(RegExp.$1);
if(ieversion<=6){
WindowLowerLimit=WindowLowerLimit+30;
}
}
var offsetfromedge=33;
var dockarray=new Array();
var dkclear=new Array();
function dockit(el,duration){
this.source=document.all? document.all[el] : document.getElementById(el);
this.source.height=this.source.offsetHeight;
this.docheight=truebody().clientHeight;
this.duration=duration;
this.pagetop=0;
this.elementoffset=this.getOffsetY();
if(this.source.height<(this.docheight - WindowLowerLimit)){
dockarray[dockarray.length]=this;
var pointer=eval(dockarray.length-1);
var dynexpress='dkclear['+pointer+']=setInterval("dockornot(dockarray['+pointer+'])",10);';
dynexpress=(this.duration>0)? dynexpress+'setTimeout("clearInterval(dkclear['+pointer+']); dockarray['+pointer+'].source.style.top=0", duration*1000)' : dynexpress;
eval(dynexpress);
}
}
dockit.prototype.getOffsetY=function(){
var totaloffset=parseInt(this.source.offsetTop);
var parentEl=this.source.offsetParent;
while(parentEl!=null){
totaloffset+=parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function dockornot(obj){
if(!window.execScript){
if(!obj){
return null;
}
}
obj.pagetop=truebody().scrollTop;
if(obj.pagetop>obj.elementoffset){
obj.source.style.top=obj.pagetop-obj.elementoffset+offsetfromedge+"px";
}else{
obj.source.style.top=0;
}
}
function truebody(){
return(document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}