var startX = 760, startY = 350;
var curY = startY;
var destY = curY;
var timerID, ton = 0;

	function initMenu()
	{
		var el = document.getElementById("menu");
		el.style.left = startX;
		el.style.top = startY;
	}

	function floatMenu()
	{
		clearInterval(timerID);
		ton = 0;
		var py = document.body.scrollTop;
		destY = py + startY;
		startFloat();
	}

	function startFloat()
	{
		var el = document.getElementById("menu");
		if(curY == destY)
		{
		clearInterval(timerID);
		ton = 0;
		}
		else if(curY < destY)
		{
		curY += 1;
		el.style.top = curY;
		if(ton == 0)
			{
			timerID = setInterval("startFloat()", 20);
			ton = 1;
		}
		}
		else if(curY > destY)
		{
		curY -= 1;
		el.style.top = curY;
		if(ton == 0)
		{
			timerID = setInterval("startFloat()", 20);
			ton = 1;
		}
		}
	}