var ibTimer;
var ibInterval = 10;

var ibContainer = null;

var ibPosition = -2;
var ibHeight;
var ibSpeed = 0;
var ibMaxSpeed = 15;

//ускорение
var iba = 0.1;


function ibInit()
{
ibContainer = document.getElementById("list_container");
if (ibContainer)
	{
	ibHeight = document.getElementById("images_list").clientHeight - ibContainer.clientHeight;
	}
}

function ibMove(dr)
{
ibSpeed = Math.min(ibMaxSpeed, ibSpeed + iba);
ibPosition += ibSpeed * dr;
ibPosition = Math.max(ibHeight, ibPosition);
ibPosition = Math.min(-2, ibPosition);
ibContainer.style.top = ibPosition + "px";
ibTimer = window.setTimeout("ibMove(" + dr + ")", 1);
}

function ibStop(dr)
{
ibSpeed = 0;
clearTimeout(ibTimer);
}

function ibGoUp()
{
ibTimer = window.setTimeout("ibMove(1)", 1);
}

function ibGoDown()
{
ibTimer = window.setTimeout("ibMove(-1)", 1);
}

//window.onload = ibInit;

