var MenuScroll = {
	init: function(){
		document.onmousemove = function(event){
			MenuScroll.onmousemove(event);
		}
	},
	onmousemove: function(event){
		if (!this.isOpened){
			if (!event){
				event = window.event;
			}
			var x = event.pageX;
			var y = event.pageY;
			
			if (!x || !y){
				x = event.x;
				y = event.y;
			}
			this.move(x, y);
		}
	},
	move: function(x, y){
		var positionY1 = y - 123 - 50;
		positionY2 = positionY1;
		if (positionY1<52){
			positionY1 = 52;
			positionY2 = 52;
		}
		if (positionY1>480){
			positionY1 = 480;
		}
		if (positionY2>208){
			positionY2 = 208;
		}
		document.getElementById('handler').style.marginTop = positionY1 + 'px';
		document.getElementById('menu_nav').style.marginTop = (positionY2 - 52) + 'px';
	},
	click: function(){
		if (!this.isOpened){
			this.open();
		}
	},
	open: function(){
		document.getElementById('menu_nav').style.display = '';
		this.isOpened = true;
	},
	close: function(){
		if (this.isOpened){
			document.getElementById('menu_nav').style.display = 'none';
			this.isOpened = false;
		}
	},
	onmouseout: function(){
		this.timeoutHandle = window.setTimeout('MenuScroll.close()', 200);
	},
	onmouseover: function(){
		if (this.timeoutHandle){
			window.clearTimeout(this.timeoutHandle);
		}
	}
}