
oi_scrolls = {};
oi_scroll.speed=100;
function oi_scroll(wnId,lyrId,cntId){this.id=wnId;oi_scrolls[this.id]=this;this.animString="oi_scrolls."+this.id;this.load(lyrId,cntId);};oi_scroll.loadLayer=function(wnId,id,cntId){if(oi_scrolls[wnId])oi_scrolls[wnId].load(id,cntId);};oi_scroll.prototype.load=function(lyrId,cntId){if(!document.getElementById)return;var wndo,lyr;if(this.lyrId){lyr=document.getElementById(this.lyrId);lyr.style.visibility="hidden";}lyr=document.getElementById(lyrId);wndo=document.getElementById(this.id);lyr.style.top=this.y=0;lyr.style.left=this.x=0;this.maxY=(lyr.offsetHeight-wndo.offsetHeight>0)?lyr.offsetHeight-wndo.offsetHeight:0;this.wd=cntId?document.getElementById(cntId).offsetWidth:lyr.offsetWidth;this.maxX=(this.wd-wndo.offsetWidth>0)?this.wd-wndo.offsetWidth:0;this.lyrId=lyrId;lyr.style.visibility="visible";this.on_load();this.ready=true;};oi_scroll.prototype.on_load=function(){};oi_scroll.prototype.shiftTo=function(lyr,x,y){if(!lyr.style||!oi_scroll.scrdy)return;lyr.style.left=(this.x=x)+"px";lyr.style.top=(this.y=y)+"px";};oi_scroll.OIcallScroll=function(){var ua=navigator.userAgent;if(ua.indexOf("OI")>-1&&ua.indexOf("Firefox")==-1&&ua.indexOf("Safari")==-1&&ua.indexOf("Konqueror")==-1){oi_scroll.hold=[];for(var i=0;arguments[i];i++){if(oi_scrolls[arguments[i]]){var wndo=document.getElementById(arguments[i]);var holderId=wndo.parentNode.id;var holder=document.getElementById(holderId);document.body.appendChild(holder.removeChild(wndo));wndo.style.zIndex=1000;var pos=getPageOffsets(holder);wndo.style.left=pos.x+"px";wndo.style.top=pos.y+"px";oi_scroll.hold[i]=[arguments[i],holderId];}}window.addEventListener("resize",oi_scroll.rePositionOI,true);}};oi_scroll.rePositionOI=function(){if(oi_scroll.hold){for(var i=0;oi_scroll.hold[i];i++){var wndo=document.getElementById(oi_scroll.hold[i][0]);var holder=document.getElementById(oi_scroll.hold[i][1]);var pos=getPageOffsets(holder);wndo.style.left=pos.x+"px";wndo.style.top=pos.y+"px";}}};function getPageOffsets(el){var left=el.offsetLeft;var top=el.offsetTop;if(el.offsetParent&&el.offsetParent.clientLeft||el.offsetParent.clientTop){left+=el.offsetParent.clientLeft;top+=el.offsetParent.clientTop;}while(el=el.offsetParent){left+=el.offsetLeft;top+=el.offsetTop;}return{x:left,y:top};};var dw_Inf={};dw_Inf.fn=function(v){return eval(v)};dw_Inf.x0=function(){dw_Inf.fn('oi_scroll.scrdy=true;');};dw_Inf.fn('dw_Inf.x0();');