function dw_Slidebar(barId, trackId, axis, x, y) {
    var bar = document.getElementById(barId);
    var track = document.getElementById(trackId);
    this.barId = barId; this.trackId = trackId;
    this.axis = axis; this.x = x || 0; this.y = y || 0;
    dw_Slidebar.col[this.barId] = this;
    this.bar = bar;  this.shiftTo(x, y);
    
    // hold for setBarSize  
    this.trkHt = track.offsetHeight; 
    this.trkWd = track.offsetWidth; 
  
    if (axis == 'v') {
        this.maxY = this.trkHt - bar.offsetHeight - y; 
        this.maxX = x; this.minX = x; this.minY = y;
    } else {
        this.maxX = this.trkWd - bar.offsetWidth - x; 
        this.minX = x; this.maxY = y; this.minY = y;
    }
    
    this.on_drag_start =  this.on_drag =   this.on_drag_end = 
    this.on_slide_start = this.on_slide =  this.on_slide_end = function() {}
    
    bar.onmousedown = dw_Slidebar.prepDrag; 
    // pass barId to obtain instance from dw_Slidebar.col
    track.onmousedown = function(e) { dw_Slidebar.prepSlide(barId, e); }
    this.bar = bar = null; track = null; 
}
/*************************************************************************
    This code is from Dynamic Web Coding at dyn-web.com
    Copyright 2001-2008 by Sharon Paine 
    See Terms of Use at www.dyn-web.com/business/terms.php
    regarding conditions under which you may use this code.
    This notice must be retained in the code as is!
    
    for use with dw_scroll.js - provides scrollbar functionality
    version date: Aug 2008
        bug fixed in .setBarSize
*************************************************************************/


for use with dw_scroll.js - provides scrollbar functionality
version date: Aug 2008
bug fixed in .setBarSize
for use with dw_scroll . js - provides scrollbar functionality version date : Aug 2008 bug fixed in . setBarSize
function dw_Slidebar(barId, trackId, axis, x, y) {
    var bar = document.getElementById(barId);
    var track = document.getElementById(trackId);
    this.barId = barId; this.trackId = trackId;
    this.axis = axis; this.x = x || 0; this.y = y || 0;
    dw_Slidebar.col[this.barId] = this;
    this.bar = bar;  this.shiftTo(x, y);
    this.trkHt = track.offsetHeight; 
    this.trkWd = track.offsetWidth; 
    if (axis == 'v') {
        this.maxY = this.trkHt - bar.offsetHeight - y; 
        this.maxX = x; this.minX = x; this.minY = y;
    } else {
        this.maxX = this.trkWd - bar.offsetWidth - x; 
        this.minX = x; this.maxY = y; this.minY = y;
    }
    this.on_drag_start =  this.on_drag =   this.on_drag_end = 
    this.on_slide_start = this.on_slide =  this.on_slide_end = function() {}
    bar.onmousedown = dw_Slidebar.prepDrag; 
    track.onmousedown = function(e) { dw_Slidebar.prepSlide(barId, e); }
    this.bar = bar = null; track = null; 
}
function dw_Slidebar ( barId , trackId , axis , x , y ) { var bar = document . getElementById ( barId ) ; var track = document . getElementById ( trackId ) ; this . barId = barId ; this . trackId = trackId ; this . axis = axis ; this . x = x || 0 ; this . y = y || 0 ; dw_Slidebar . col [ this . barId ] = this ; this . bar = bar ; this . shiftTo ( x , y ) ; this . trkHt = track . offsetHeight ; this . trkWd = track . offsetWidth ; if ( axis == 'v' ) { this . maxY = this . trkHt - bar . offsetHeight - y ; this . maxX = x ; this . minX = x ; this . minY = y ; } else { this . maxX = this . trkWd - bar . offsetWidth - x ; this . minX = x ; this . maxY = y ; this . minY = y ; } this . on_drag_start = this . on_drag = this . on_drag_end = this . on_slide_start = this . on_slide = this . on_slide_end = function ( ) { } bar . onmousedown = dw_Slidebar . prepDrag ; track . onmousedown = function ( e ) { dw_Slidebar . prepSlide ( barId , e ) ; } this . bar = bar = null ; track = null ; }
This code is from Dynamic Web Coding at dyn-web.com
Copyright 2001-2008 by Sharon Paine
See Terms of Use at www.dyn-web.com/business/terms.php
regarding conditions under which you may use this code.
This code is from Dynamic Web Coding at dyn - web . com Copyright 2001 - 2008 by Sharon Paine See Terms of Use at www . dyn - web . com / business / terms . php regarding conditions under which you may use this code .
// hold for setBarSize   // pass barId to obtain instance from dw_Slidebar.col