var upAndDown3 = new Class({        
        Implements: [Events, Options],  
        options: {
          containerHeight: 245
        },
        initialize: function(container){
          var params = Array.link(arguments, {'options': Object.type, 'element': $defined});
          this.setOptions(params.options || { });
          this.container = $$(container);          
          this.size = this.container.getParent()[0].getScrollSize();
          this.height = this.container.getParent()[0].getSize();
          this.container.setStyle("top", 0);
          this.initItems();
        },
        initItems: function(){
          this.upButton = this.container.getParent().getParent().getChildren(".up-down")[0].getChildren(".button-up")[0];
          this.upButton.addClass('button-up-disabled');
          this.downButton = this.upButton.getPrevious();
          if (this.size.y <= this.height){
            this.downButton.addClass('button-down-disabled');
          };
          this.initButtons();
        },
        moves: function(step){
          var cont = this.downButton.getParent().getParent().getChildren(".window")[0].getChildren(".up-down-list")[0];
          if(cont.getStyle('top')[0].toFloat() >= 0){
            if(step.btn == "up"){
              this.upButton.fireEvent("mouseup2");
              this.upButton.addClass("button-up-disabled");
            }
            else{
              cont.setStyle("top", cont.getStyle('top')[0].toFloat()+step.step);
            };
          }
          else if(-(this.size.y-this.height.y) >= cont.getStyle('top')[0].toFloat()){
            if(step.btn == "down"){
              this.downButton.fireEvent("mouseup2");
              this.downButton.addClass("button-down-disabled");
            }
            else{
              cont.setStyle("top", cont.getStyle('top')[0].toFloat()+step.step);
            };
          }
          else cont.setStyle("top", cont.getStyle('top')[0].toFloat()+step.step);
        },
        initButtons: function(){
          var id = 0;
          this.upButton.addEvent("click", function(e){
            e.stop();
          });
          this.upButton.addEvent("mousedown", function(e){
            if(this.upButton.hasClass("button-up-disabled")){
              id = this.moves.periodical(42, this, {step: 10, btn: 'up'});
              this.downButton.removeClass("button-down-disabled");
            };
            e.stop();
          }.bind(this));
          this.upButton.addEvent("mouseup", function(e){
           clearInterval(id);
            e.stop();
          }.bind(this));
          this.upButton.addEvent("mouseup2", function(e){
           clearInterval(id);
          }.bind(this));
          this.downButton.addEvent("click", function(e){
            e.stop();
          });
          this.downButton.addEvent("mousedown", function(e){
            if(this.downButton.hasClass("button-down-disabled")){
              id = this.moves.periodical(42, this, {step: -10, btn: 'down'});
              this.upButton.removeClass("button-up-disabled");
            };
            e.stop();
          }.bind(this));
          this.downButton.addEvent("mouseup", function(e){
            clearInterval(id);
            e.stop();
          }.bind(this));
          this.downButton.addEvent("mouseup2", function(){
            clearInterval(id);
          }.bind(this));
        }
});