
var check=parseInt (Layer1.style.top, 10);

function CheckUIElements()
{
	var yMenuFrom, yMenuTo, yOffset; 

	yMenuFrom   = parseInt (Layer1.style.top, 10);
	yMenuTo     = document.body.scrollTop + check - height;

	if ( yMenuFrom != yMenuTo )
	{
		if ( document.body.scrollTop < height )
		{
			yOffset = Math.ceil( Math.abs( check - yMenuFrom ) / 50 ); 

			if ( yMenuTo < yMenuFrom ) yOffset = -yOffset; 

			Layer1.style.top = parseInt (Layer1.style.top, 10) + yOffset; 
		}
		else
		{
			yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 50 ); 

			if ( yMenuTo < yMenuFrom ) yOffset = -yOffset; 

			Layer1.style.top = parseInt (Layer1.style.top, 10) + yOffset; 
		}
	} 

	setTimeout ('CheckUIElements()'); 
}

CheckUIElements(); 

var no = 0;

function goUp()
{
	var len = document.all['goods'].length;

	if(no > 0)
	{
		listGoods.style.top = - hei * no + hei;
		no--;
	}
}

function goDown()
{
	var len = document.all['goods'].length;

	if(len > (view + no))
	{
		listGoods.style.top =- hei * (no+1);
		no++;
	}
}

