var oMenyy = {
	callRate	: 20,
	slideTime	: 600,
	maxDiff		: document.all ? document.body.clientHeight : window.innerHeight,
	isIE		: document.all ? true : false,
	MenyyDiv	: document[document.all ? "all" : "layers"]["myMenyy"]
}

window.setInterval("oMenyy.main( )", oMenyy.callRate)

oMenyy.main = function( )
{
	this.currentY			= this.isIE ? this.MenyyDiv.style.pixelTop : this.MenyyDiv.top
	this.scrollTop			= this.isIE ? document.body.scrollTop : window.pageYOffset
	this.scrollHeight		= this.isIE ? document.body.scrollHeight : window.outerHeight
	this.availSpace			= this.scrollHeight - this.scrollTop
	this.midpoint			= this.scrollHeight / 2
    
	var newTargetY		= (this.scrollTop) + 145

	if ( this.currentY != newTargetY ) {
		if ( newTargetY != this.targetY ) {
			this.targetY = newTargetY
			this.slideInit( )
		}
		this.slide( )
	}
}

oMenyy.slideInit = function( )
{
	var now	= new Date( )

	this.A		= this.targetY - this.currentY
	this.B		= Math.PI / ( 2 * this.slideTime )
	this.C		= now.getTime( )

	if (Math.abs(this.A) > this.maxDiff) {
		this.D = this.A > 0 ? this.targetY - this.maxDiff : this.targetY + this.maxDiff
		this.A = this.A > 0 ? this.maxDiff : -this.maxDiff
	} else {
		this.D = this.currentY
	}
}

oMenyy.slide = function( )
{
	var now	= new Date( )
	var newY	= this.A * Math.sin( this.B * ( now.getTime( ) - this.C ) ) + this.D
	newY		= Math.round( newY )

	if (( this.A > 0 && newY > this.currentY ) ||
		( this.A < 0 && newY < this.currentY )) {
			
			if ( this.isIE )this.MenyyDiv.style.pixelTop = newY;
			else			this.MenyyDiv.top = newY
	}
}
    