    function HorizontalSlider(containerId, stepWidth, sliderWidth, leftButtonId, rightButtonId) {
        var _StepWidth = stepWidth;
        var _ContainerID = containerId;
        var _ScrollPosition = 0;
        var _SliderWidth = sliderWidth;

        var _LeftButton = $("#" + leftButtonId);
        var _RightButton = $("#" + rightButtonId);

        function CheckButtons() {
            //get scroll actual width
            var _ScrollHeight = 0;
            $("#" + _ContainerID).children().each(function() { _ScrollHeight += $(this).width(); });

            if (_ScrollPosition >= 0) {
                _LeftButton.css("display", "none");
            } else {
                _LeftButton.css("display", "");
            }
            
            if (_ScrollHeight + _ScrollPosition <= _SliderWidth) {
                _RightButton.css("display", "none");
            }
            else {
                _RightButton.css("display", "");
            }
        }

        this.ScrollLeft = function() {
            if ($("#" + _ContainerID + ":animated").get(0) != null) return;
            _ScrollPosition += _StepWidth;
            $("#" + _ContainerID).animate({ left: _ScrollPosition }, "slow");
            CheckButtons();
        }
        this.ScrollRight = function() {
            if ($("#" + _ContainerID + ":animated").get(0) != null) return;
            _ScrollPosition -= _StepWidth;
            $("#" + _ContainerID).animate({ left: _ScrollPosition }, "slow");
            CheckButtons();
        }
        CheckButtons();
    }
