// Coded by Travis Beckham http://www.squidfingers.com | http://www.podlob.com
// If want to use this code, feel free to do so, but please leave this message intact.
// --- version date: 01/24/03
// Minor modifications by Ryan Quigley for exhibit-E.com - 01/24/03 
var dom=document.getElementById;var iex=document.all;function eeSaddEvent(A,B){this[A]=B}function eeSremoveEvent(A){this[A]=null}function eeSgetElement(A,C){C=C?"document."+C+".":"";var B=dom?document.getElementById(A):iex?document.all[A]:false;B.css=B.style;B.getTop=function(){return parseInt(B.css.top)||0};B.setTop=function(D){B.css.top=D+"px"};B.getHeight=function(){return B.offsetHeight};B.getClipHeight=function(){return B.offsetHeight};B.hideVis=function(){B.css.visibility="hidden"};B.eeSaddEvent=eeSaddEvent;B.eeSremoveEvent=eeSremoveEvent;return B}function getYMouse(A){if(!A){var A=window.event}if(A.PageY){return A.pageY}else{if(A.clientY){return A.clientY+document.body.scrollTop}}}document.eeSaddEvent=eeSaddEvent;document.eeSremoveEvent=eeSremoveEvent;ScrollObj=function(speed,dragHeight,trackHeight,trackObj,upObj,downObj,dragObj,contentMaskObj,contentObj){this.speed=speed;this.dragHeight=dragHeight;this.trackHeight=trackHeight;this.trackObj=eeSgetElement(trackObj);this.upObj=eeSgetElement(upObj);this.downObj=eeSgetElement(downObj);this.dragObj=eeSgetElement(dragObj);this.contentMaskObj=eeSgetElement(contentMaskObj);this.contentObj=eeSgetElement(contentObj,contentMaskObj);this.obj=contentObj+"Object";eval(this.obj+"=this");this.trackTop=this.dragObj.getTop();this.trackLength=this.trackHeight-this.dragHeight;this.trackBottom=this.trackTop+this.trackLength;this.contentMaskHeight=this.contentMaskObj.getClipHeight();this.contentHeight=this.contentObj.getHeight();this.contentLength=this.contentHeight-this.contentMaskHeight;this.scrollLength=this.trackLength/this.contentLength;this.scrollTimer=null;if(this.contentHeight<=this.contentMaskHeight){this.dragObj.hideVis();this.upObj.hideVis();this.downObj.hideVis();this.trackObj.hideVis()}else{var self=this;this.trackObj.eeSaddEvent("onmousedown",function(e){self.scrollJump(e);return false});this.upObj.eeSaddEvent("onmousedown",function(){self.scroll(self.speed);return false});this.upObj.eeSaddEvent("onmouseup",function(){self.stopScroll()});this.upObj.eeSaddEvent("onmouseout",function(){self.stopScroll()});this.downObj.eeSaddEvent("onmousedown",function(){self.scroll(-self.speed);return false});this.downObj.eeSaddEvent("onmouseup",function(){self.stopScroll()});this.downObj.eeSaddEvent("onmouseout",function(){self.stopScroll()});this.dragObj.eeSaddEvent("onmousedown",function(e){self.startDrag(e);return false});if(iex){this.dragObj.eeSaddEvent("ondragstart",function(){return false})}}};ScrollObj.prototype.startDrag=function(B){this.dragStartMouse=getYMouse(B);this.dragStartOffset=this.dragObj.getTop();var A=this;document.eeSaddEvent("onmousemove",function(C){A.drag(C)});document.eeSaddEvent("onmouseup",function(){A.stopDrag()})};ScrollObj.prototype.stopDrag=function(){document.eeSremoveEvent("onmousemove");document.eeSremoveEvent("onmouseup")};ScrollObj.prototype.drag=function(F){var A=getYMouse(F);var C=A-this.dragStartMouse;var E=this.dragStartOffset+C;var B=(E<this.trackTop)?this.trackTop:(E>this.trackBottom)?this.trackBottom:E;this.dragObj.setTop(B);var D=-(B-this.trackTop)*(1/this.scrollLength);this.contentObj.setTop(D)};ScrollObj.prototype.scroll=function(C){var B=this.contentObj.getTop()+C;var A=this.trackTop-Math.round(this.contentObj.getTop()*(this.trackLength/this.contentLength));if(B>0){B=0}else{if(B<-this.contentLength){B=-this.contentLength}}if(A<this.trackTop){A=this.trackTop}else{if(A>this.trackBottom){A=this.trackBottom}}this.contentObj.setTop(B);this.dragObj.setTop(A);this.scrollTimer=window.setTimeout(this.obj+".scroll("+C+")",25)};ScrollObj.prototype.stopScroll=function(){if(this.scrollTimer){window.clearTimeout(this.scrollTimer);this.scrollTimer=null}};ScrollObj.prototype.scrollJump=function(E){var A=getYMouse(E);var D=A-findPosY(this.trackObj);var B=(D<this.trackTop)?this.trackTop:(D>this.trackBottom)?this.trackBottom:D;this.dragObj.setTop(B);var C=-(B-this.trackTop)*(1/this.scrollLength);this.contentObj.setTop(C)};ScrollObj.prototype.syncBarPosToContent=function(B){if(B){var A=this.trackTop-Math.round(B*(this.trackLength/this.contentLength))}else{var A=this.trackTop-Math.round(this.contentObj.getTop()*(this.trackLength/this.contentLength))}this.dragObj.setTop(A)};function findPosY(B){var A=0;if(B.offsetParent){while(B.offsetParent){A+=B.offsetTop;B=B.offsetParent}}else{if(B.y){A+=B.y}}return A};
