/**
 * @author mzadryebkel
 */
            var DragScrollable = Class.create();
            DragScrollable.prototype = {
              initialize: function(element) {
                this.element = $(element);
                this.active = false;
                this.scrolling = false;
            
                this.element.style.cursor = 'pointer';
            
                this.eventMouseDown = this.startScroll.bindAsEventListener(this);
                this.eventMouseUp   = this.endScroll.bindAsEventListener(this);
                this.eventMouseMove = this.scroll.bindAsEventListener(this);
            
                Event.observe(this.element, 'mousedown', this.eventMouseDown);
              },
              destroy: function() {
                Event.stopObserving(this.element, 'mousedown', this.eventMouseDown);
                Event.stopObserving(document, 'mouseup', this.eventMouseUp);
                Event.stopObserving(document, 'mousemove', this.eventMouseMove);
              },
              startScroll: function(event) {
                this.startX = Event.pointerX(event);
                this.startY = Event.pointerY(event);
                if (Event.isLeftClick(event) &&
                    (this.startX < this.element.offsetLeft + this.element.clientWidth) &&
                    (this.startY < this.element.offsetTop + this.element.clientHeight)) {
                  this.element.style.cursor = 'move';
                  Event.observe(document, 'mouseup', this.eventMouseUp);
                  Event.observe(document, 'mousemove', this.eventMouseMove);
                  this.active = true;
                  Event.stop(event);
                }
              },
              endScroll: function(event) {
                this.element.style.cursor = 'pointer';
                this.active = false;
                Event.stopObserving(document, 'mouseup', this.eventMouseUp);
                Event.stopObserving(document, 'mousemove', this.eventMouseMove);
                Event.stop(event);
              },
              scroll: function(event) {
                if (this.active) {
                  this.element.scrollTop += (this.startY - Event.pointerY(event));
                  this.element.scrollLeft += (this.startX - Event.pointerX(event));
                  this.startX = Event.pointerX(event);
                  this.startY = Event.pointerY(event);
                }
                Event.stop(event);
              }
            }
		  
		  
            Effect.ScrollContent = Class.create();
            Object.extend(Object.extend(Effect.ScrollContent.prototype, 
            Effect.Base.prototype), {
                initialize: function(element, direction) {
                    var options = arguments[2] || {};
                    this.element = $(element);
                    
                    this.scrollFromX = this.element.scrollLeft;
                    this.scrollDeltaX = this.element.offsetWidth;
                    this.scrollFromY = this.element.scrollTop;
                    this.scrollDeltaY = this.element.offsetHeight;
                    this.direction = direction || {x:0,y:1};
                    
                    this.start(options);
                },
                update: function(position) {
                    this.element.scrollLeft = Math.round(this.scrollFromX+this.direction.x*position*this.scrollDeltaX);
                    this.element.scrollTop = Math.round(this.scrollFromY+this.direction.y*position*this.scrollDeltaY);
                }
            });
            
            Object.extend(Event, {
            	wheel:function (event){
            		var delta = 0;
            		if (!event) event = window.event;
            		if (event.wheelDelta) {
            			delta = event.wheelDelta/120; 
            			if (window.opera) delta = -delta;
            		} else if (event.detail) { delta = -event.detail/3;	}
            		return Math.round(delta); //Safari Round
            	}
            });

// zaznaczanie pól w formularzach 
			function select_input(){
				this.focus();
			}
