
reakcja=10
szybkosc=3

function Namiar(t)
{
	celY=t;
	if(!anim)
		menuGo()
}

function getEl(id)
{
	with(d)var e=g?g(id):a?a[id]:l[id]
	
	if(!e.style)
		e.style=e;
	
	return e
}
function menuGo()
{
	
	oBy=(szybkosc*oBy+celY)/(szybkosc+1)
	getEl('indexLeft_plywajace').style.top=Math.round(oBy)+'px'
	if(Math.round(oBy)!=celY)
		anim=setTimeout("menuGo()",20)
	else
		anim=0
}

function scrLay()
{
	var pYoff=(d.a&&!window.opera)?document.documentElement.scrollTop:window.pageYOffset
	if(parseInt(getEl('indexLeft_plywajace').style.top)!=pYoff+gora)
		Namiar(pYoff+gora)
}

function initMenu(wartosc)
{
	gora=wartosc,
	d=document,
	d.l=d.layers,
	d.a=d.all,
	d.g=d.getElementById,
	oBy=gora,
	anim=0

	setInterval('scrLay()',reakcja)
}
