function xscroll(id) {
    this.outerDiv = $(id);
    this.innerDiv = this.outerDiv.firstChild;
    this.innerDiv.style.top = '0px';  
    
    this.outerDiv.innerDiv = this.innerDiv;
    this.outerDiv.onmousemove = function(e) {
        
        var posx = 0;
        var posy = 0;
        if (!e) var e = window.event;
        if (e.pageX || e.pageY) 	{
            posx = e.pageX;
            posy = e.pageY;
        }
        else if (e.clientX || e.clientY) 	{
            posx = e.clientX + document.body.scrollLeft
                + document.documentElement.scrollLeft;
            posy = e.clientY + document.body.scrollTop
                + document.documentElement.scrollTop;
        }
        
        diffy = posy - this.oldy;
        
        ih = this.innerDiv.offsetHeight;
        oh = this.offsetHeight;
        
        if (ih<oh) { return; }
        
        ratio = (ih-oh)/(oh-10);
        newy = Math.ceil(parseInt(this.innerDiv.style.top) - (diffy*(ratio+.5)));
        
        if (newy > 0) { newy=0; } //dont let the top separate from the top of the box
        if (newy < (oh-ih)) { newy=(oh-ih); } //dont let the bottom separate from the bottom of the box
        if (!isNaN(newy)) {
            this.innerDiv.style.top = newy + 'px';  
        }

        this.oldy = posy;
    }
}