// activescroll99
Fx.Properties = Fx.Styles.extend({
	increase: function(){
		for (var p in this.now) this.element[p] = this.now[p];
	}
});

Fx.FlyingScroller = Fx.Properties.extend({
	initialize: function(el, options){
		this.parent(el, options);
		this.options = Object.extend(this.options || {}, Object.extend({
			paddingLeft: 0,
			paddingTop: 0
		}, options || {}));
	},

	toElement: function(el, paddingLeft, paddingTop){
		this.goTo(el.offsetLeft - (paddingLeft || this.options.paddingLeft || 0), el.offsetTop - (paddingTop || this.options.paddingTop || 0));
	},

	goTo: function(x, y){
		this.custom({
			'scrollLeft': [this.element.scrollLeft, x],
			'scrollTop': [this.element.scrollTop, y]
		})
	}
});

window.onload=function(){
	panel.clearTimer().toElement($('content1'));
	return false;
}



// global mouse variables
var activeFrameIndex = 1;
var maxFrameIndex    = 7;

// funtion to change the variable "active" up or down
function getNewFrameIndex( wheelDelta ) {
    if ( ( wheelDelta < 0 ) && ( activeFrameIndex > 1 ) ) {
        activeFrameIndex--;
    } else if ( ( wheelDelta > 0 ) && ( activeFrameIndex < maxFrameIndex ) )  {
        activeFrameIndex++;
    }
    return activeFrameIndex;
}

function handle( delta ) {
    var s = delta + ": ";
    var activeFrameName = "content" + getNewFrameIndex( delta );
    panel.clearTimer().toElement($(activeFrameName));
}
/*
function wheel( 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;
	}
	if ( delta ) handle( delta );
}

//start event listener
if ( window.addEventListener ) window.addEventListener( 'DOMMouseScroll', wheel, false );
window.onmousewheel = document.onmousewheel = wheel;
*/
