////ADAPTED BY heinrich@simplistik.com 12.28.01/////////
ypSimpleScroll.prototype.createScrollBar = function(barWidth,barHeight,sliderHeight,barTop,barLeft,sliderImg) 
{
this.barId = this.id + "Bar"
this.sliderId = this.barId + "Slider"
this.barH = barHeight ? barHeight : this.clipH
this.barW = barWidth ? barWidth : 15
this.barY = barTop ? barTop : parseInt(this.by)
this.barX = barLeft ? barLeft : (parseInt(this.bx) + this.clipW + 10)
this.sliderH = sliderHeight ? sliderHeight : this.barH/6
this.sliderMax = this.barH - this.sliderH
var bhtml = "<style type='text/css'>\n"
bhtml += "#" + this.barId + " {\n"
bhtml += "position:absolute;\n"
bhtml += "top:" + this.barY + "px;left:" + this.barX + "px;\n"
bhtml += "width:" + this.barW + "px;height:" + this.barH + "px;\n"
bhtml += "}\n #" + this.sliderId + " {\n"
bhtml += "position:absolute;top:0px;left:0px;\n"
bhtml += "width:" + this.barW + "px;height:" + this.sliderH + "px;\n"
bhtml += "}\n</style>"
if (document.getElementById) document.write(bhtml)
var imgHtml = sliderImg ? ("<img src=" + sliderImg + ">") : "&nbsp;"
var dhtml = "<div id='" + this.barId + "'>"
dhtml += "<div id='" + this.sliderId + "'>" + imgHtml + "</div></div>"
if (document.getElementById) document.write(dhtml)
}
/////FOLLOWING THREE FUNCTIONS HIJACKED/////////// 
/////AND MODIFIED FROM THE THREEOH SCROLLER///////
ypSimpleScroll.prototype.startDrag = function(e) {
if (!e) e = window.event
var ey = e.pageY ? e.pageY : e.clientY
this.dragLastY = ey
this.dragStartOffset = ey - parseInt(this.style.top)
ypSimpleScroll.current = this.obj
document.onmousemove = this.obj.doDrag
document.onmouseup = this.obj.stopDrag
if (this.obj.aniTimer) window.clearInterval(this.obj.aniTimer)
return false;
}
ypSimpleScroll.prototype.doDrag = function(e) {
if (!e) e = window.event
var obj = ypSimpleScroll.current
var ey = (e.pageY ? e.pageY : e.clientY)
var dy = ey - obj.slider.dragLastY
var ny = parseInt(obj.slider.style.top) + dy
if (ny >= obj.sliderMax) {
obj.slider.dragLastY = obj.sliderMax + obj.slider.dragStartOffset
obj.slider.style.top = obj.sliderMax + "px"
} else if (ny < 0) {
obj.slider.dragLastY = obj.slider.dragStartOffset
obj.slider.style.top = "0px"
} else {
obj.slider.dragLastY = ey
obj.slider.style.top = ny + "px"
}
ny = Math.min(Math.max(ny, 0), obj.sliderMax)
obj.jumpTo(0,(ny * obj.scrollH / obj.sliderMax))
return false;
}
ypSimpleScroll.prototype.stopDrag = function() {
this.onmousemove = null
this.onmouseup   = null
}
ypSimpleScroll.prototype.loadScrollBar = function() {
if (document.getElementById) {
this.slider = document.getElementById(this.sliderId);
this.gRef = "ypSimpleScrollBar_"+this.sid
eval(this.gRef+"=this")
this.slider.obj	= this
this.slider.style.top = "0px"
this.slider.cursor = "pointer"
this.slider.onmousedown = this.startDrag
}
}