      var sliders = new Array();
      function StyleSlider(element, name) 
      {
        this.element = document.getElementById(element);
        this.styleName = name;
        this.styleUnit = 'px';

        this.startValue = parseInt(this.element.style[this.styleName]);
        if (isNaN(this.startValue)) this.startValue = 0;
        
        this.endValue = this.startValue;
        this.slideMode = 'linear';
        this.steps = 10;
        this.length = 1000;
        sliders[sliders.length] = this;
        this.index = (sliders.length - 1);
        this.brez_cx = 0;
        this.brez_bx = 0;
        this.brez_ax = 0;
        this.value = this.startValue;
      }
      
      StyleSlider.prototype = {
        startSlide: function() 
        {
          var duration = this.length / this.steps;
          if (this.slideMode == 'easeIn') {
            this.prepBrez(0, 0);
          }
          if (this.slideMode == 'easeOut') {
            this.prepBrez(1, 1);
          }
          for (var i = 0; i < this.steps; i++)
          {
            var p;
            var p2;
            if (this.slideMode == 'linear')
              p = i / this.steps;

            if (this.slideMode == 'easeIn') // start slow, speed up
              p = this.calcBrez((i / this.steps));
              
            if (this.slideMode == 'easeOut') // start fast, slow down
              p = this.calcBrez((i / this.steps));

            p2 = 1 - p;        
            var value = this.endValue * p + this.startValue * p2;        
            if (i == this.steps - 1)     
              value = this.endValue;
            setTimeout('sliders[' + this.index + '].setValue(' + value + ')', duration * i);
          }
        },
        setValue: function(value) 
        {
          value = Math.round(value);
          this.element.style[this.styleName] = value + this.styleUnit;
          this.value = value;
        },
        prepBrez: function(x1, x2)
        {
          this.brez_cx = 3 * (x1);
          this.brez_bx = 3 * (x2 - x1) - this.brez_cx;
          this.brez_ax = 1 - this.brez_cx - this.brez_bx;
        },
        calcBrez: function(t)
        {
          return this.brez_ax * Math.pow(t, 3) + this.brez_bx * Math.pow(t, 2) + this.brez_cx * t;
        }   
        
      }

