var	timer = 0;
var	mem = 0;

function move_text(mode, mem_actual, max_height, obj_name)
{
	var	doc;
	var	x;
	var	max;

	if (mem != mem_actual)
		return ;

		/*On recupere */
	doc = document.getElementById(obj_name);
	x = doc.offsetTop;
	if (doc.offsetHeight)
		max = doc.offsetHeight - parseInt(max_height);
	else if (doc.style.pixelHeight)
		max = doc.style.pixelHeight - parseInt(max_height);

	if (max < 0)
		max = 0;
	max = -max;

		/* On deplace */
	if (mode == 'bottom')
		x -= 10;
	else
		x += 10;

	if (x < max)
		x = max;

	if (x > 0)
		x = 0;

	doc.style.top = x + "px";
	mem = 1;
	timer = setTimeout('move_text(\'' + mode + '\', 1, ' + max_height + ', \'' + obj_name + '\');', 100);
}

function stop_moving_text()
{
	mem = 0;
	clearTimeout(timer);
}
