﻿function Scroller(elemId) {
    this.intervalId = null;
    this.StartScrollLeft = function () {
        this.intervalId = setInterval("document.getElementById('" + elemId + "').scrollLeft-=5", 25);
    }
    this.StartScrollRight = function () {
        this.intervalId = setInterval("document.getElementById('" + elemId + "').scrollLeft+=5", 25);
    }
    this.StartScrollUp = function () {
        this.intervalId = setInterval("document.getElementById('" + elemId + "').scrollTop-=5", 25);
    }
    this.StartScrollDown = function () {
        this.intervalId = setInterval("document.getElementById('" + elemId + "').scrollTop+=5", 25);
    }
    this.StopScroll = function () {
        clearInterval(this.intervalId);
    }
} 