    var scrollObjectCount = 0;
    var mouseX;
    var mouseY;
    var scrollers = new Array();
    
    var InternetExplorer = document.all?true:false
    
    function scrollObject(element, border, buttonUp, buttonDown)
    {
        // ELEMENTS
        this.elem = $(element);
        this.elemBorder = $(border);
        this.elemBorder.style.overflow = 'hidden';
        
        
        var index = scrollObjectCount;
        
        // BUTTONS
        this.buttonUp = document.getElementById(buttonUp);
        
        addEvent(this.buttonUp, "mouseover", function(evt) {
            scrollUp(index);
        }, false);
        addEvent(this.buttonUp, "mouseout", function(evt) {
            scrollStop(index);
        }, false);

        this.buttonDown = document.getElementById(buttonDown);
        
        addEvent(this.buttonDown, "mouseover", function(evt) {
            scrollDown(index);
        }, false);
        addEvent(this.buttonDown, "mouseout", function(evt) {
            scrollStop(index);
        }, false);
       
        this.buttonUpOffset = getElementOffsetTop(this.buttonUp);
        this.buttonDownOffset = getElementOffsetTop(this.buttonDown);
        
        // MISC
        this.currentPosition = 0;
        this.maxPosition = -((this.elem.offsetHeight - this.elemBorder.offsetHeight) < 0 ? 0 :
                              this.elem.offsetHeight - this.elemBorder.offsetHeight)
        this.doScroll = true;
        
        this.buttonDown.disabled = true;
        this.buttonDown.style.cursor = "default";
        
        if (this.maxPosition == 0)
        {
            this.buttonUp.disabled = true;
            this.buttonUp.style.cursor = "default";
        }
        // METHODS
        this.scrollObjectUp = scrollObjectUp;
        this.canScrollObjectUp = canScrollObjectUp;
        
        this.scrollObjectDown = scrollObjectDown;
        this.canScrollObjectDown = canScrollObjectDown;
        
        scrollers[scrollObjectCount] = this;
        scrollObjectCount++;
    }
    
    function scrollObjectWithImageButtons(element, border, buttonUp, buttonDown, deactivatedButtonUpImage, deactivatedButtonDownImage)
    {
         // ELEMENTS
        this.elem = document.getElementById(element);
        this.elemBorder = document.getElementById(border);
        this.elemBorder.style.overflow = 'hidden';
        
        
        var index = scrollObjectCount;
        
        // BUTTONS
        this.buttonUp = document.getElementById(buttonUp);
        
        
        addEvent(this.buttonUp, "mouseover", function(evt) {
            scrollUp(index);
        }, false);
        addEvent(this.buttonUp, "mouseout", function(evt) {
            scrollStop(index);
        }, false);

        this.buttonDown = document.getElementById(buttonDown);
        
        addEvent(this.buttonDown, "mouseover", function(evt) {
            scrollDown(index);
        }, false);
        addEvent(this.buttonDown, "mouseout", function(evt) {
            scrollStop(index);
        }, false);
        
        this.buttonUpImage = this.buttonUp.src;
        this.buttonDownImage = this.buttonDown.src;
        this.buttonUpDeactivatedImage = deactivatedButtonUpImage;
        this.buttonDownDeactivatedImage = deactivatedButtonDownImage;
        
        this.buttonUpOffset = getElementOffsetTop(this.buttonUp);
        this.buttonDownOffset = getElementOffsetTop(this.buttonDown);
        
        // MISC
        this.currentPosition = 0;
        this.maxPosition = -((this.elem.offsetHeight - this.elemBorder.offsetHeight) < 0 ? 0 :
                              this.elem.offsetHeight - this.elemBorder.offsetHeight)
        this.doScroll = true;
        
        
        this.buttonDown.src = this.buttonDownDeactivatedImage;
        this.buttonDown.style.cursor = "default";
        
        if (this.maxPosition == 0)
        {
            this.buttonUp.src = this.buttonUpDeactivatedImage;
            this.buttonUp.disabled = true;
            this.buttonUp.style.cursor = "default";
        }
        
        // METHODS
        this.scrollObjectUp = scrollObjectUp;
        this.canScrollObjectUp = canScrollObjectUp;
        
        this.scrollObjectDown = scrollObjectDown;
        this.canScrollObjectDown = canScrollObjectDown;
        
        scrollers[scrollObjectCount] = this;
        
        scrollObjectCount++;
        

    
    }
    
    function canScrollObjectUp()
    {
        return this.maxPosition < this.currentPosition && this.doScroll;
    }
    
    function canScrollObjectDown()
    {
        return this.currentPosition < 0 && this.doScroll;
    }
    
    function scrollObjectUp(e)
    {   
        if (this.canScrollObjectUp())
        {
           var gesch = Math.round((mouseY - this.buttonUpOffset) / 5) + 1;
           
                
            gesch = gesch == 1 ? 3 : gesch == 3 ? 1 : 2; 
                
            this.elem.style.top = this.currentPosition + "px";
            this.currentPosition -= gesch;
            
            if (scrollObjectWithImageButtons.prototype.isPrototypeOf(this))
            {
                this.buttonDown.src = this.buttonDownImage;
            }
            else
            {
                this.buttonDown.disabled = false;
            }
            this.buttonDown.style.cursor = "pointer";
            
            return true;
        }
        else if (this.maxPosition >= this.currentPosition)
        {
        
            if (scrollObjectWithImageButtons.prototype.isPrototypeOf(this))
            {
                this.buttonUp.src = this.buttonUpDeactivatedImage;
            }
            else
            {
                this.buttonUp.disabled = true;
            }
            
            this.buttonUp.style.cursor = "default";
            
            return false;
        }
    }
    
    function scrollObjectDown()
    {
        
        if (this.canScrollObjectDown())
        {
            var gesch = Math.round((mouseY - this.buttonUpOffset) / 5) + 1;
            
            gesch = gesch == 1 ? 3 : gesch == 3 ? 1 : 2; 
        
            this.elem.style.top = this.currentPosition + "px";
            this.currentPosition += gesch;
            if (scrollObjectWithImageButtons.prototype.isPrototypeOf(this))
            {
                this.buttonUp.src = this.buttonUpImage;
            }
            else
            {
                this.buttonUp.disabled = false;
            }
            
            this.buttonUp.style.cursor = "pointer";
            
            return true;
        }
        else if (this.currentPosition >= 0)
        {   
            if (scrollObjectWithImageButtons.prototype.isPrototypeOf(this))
            {
                this.buttonDown.src = this.buttonDownDeactivatedImage;
            }
            else
            {
                this.buttonDown.disabled = true;
            }
            
            this.buttonDown.style.cursor = "default";
            return false;
        }
    }
    
    var active = false;
    
    function scrollUp(scroller)
    {
        if (scrollers[scroller].scrollObjectUp())
        {
            window.setTimeout("scrollUp(" + scroller + ")", 10);
        }
    }
    
    var actScroller;
    
    function scrollDown(scroller)
    {   
        if (scrollers[scroller].scrollObjectDown())
        {
            window.setTimeout("scrollDown(" + scroller + ")", 1);
        }    
    }
    
    function scrollStop(scroller)
    {
        scrollers[scroller].doScroll = false;
        window.setTimeout("scrollers[" + scroller + "].doScroll = true;", 10);
    }
    
    function getElementOffsetTop(element)
    {
        var offset = 0;
        var cElement = element;
        while (cElement != null && cElement != "undefined")
        {
            offset += cElement.offsetTop;
            cElement = cElement.offsetParent;
        }
        
        return offset;
    }
    
    
    function captureMousePosition(e)
    {
        //mouseX = getMouseX(e);
        mouseY = getMouseY(e);
    }
    
    function getMouseY(e)
    {
      var tempY;
      if (InternetExplorer) {
        //alert($$("body")[0].scrollTop);
        tempY = event.clientY;// + $$("body")[0].scrollTop;
      } else { 
        tempY = e.pageY;
      }  
      if (tempY < 0){tempY = 0}
      
      return tempY;
    }
    
    function getMouseX(e)
    {
      var tempX;
      
      if (InternetExplorer) {
        tempX = event.clientX + $$("body")[0].scrollTop;
      } else {
        tempX = e.pageX;
      }  
      if (tempX < 0){tempX = 0}
      
      return tempX;
    }
 
    if (document.layers) {
        document.captureEvents(Event.MOUSEMOVE);
        document.onmousemove = captureMousePosition;
    } else if (document.all) { 
         document.onmousemove = captureMousePosition;
    } else if (document.getElementById) {
        document.onmousemove = captureMousePosition;
    }
    
    function addEvent(obj, eventType, functions, useCaption)
    {
      if (obj.addEventListener) {
        obj.addEventListener(eventType, functions, useCaption);
        return true;
      } else if (obj.attachEvent) {
        var retVal = obj.attachEvent("on"+eventType, functions);
        return retVal;
      } else {
        return false;
      }
    }
    