var temps;
var longdelscroll = limiteinfscroll - limitesupscroll;
var offset = 50;
var textitem;

function scrollup()
{
	if (parseInt(textitem.style.top) < limitesuptexto) {
		textitem.style.top = parseInt(textitem.style.top) + brusquedad;
	}
	temps = setTimeout('scrollup()', lentitud);
}

function scrolldown()
{
	if (parseInt(textitem.style.top) > (-textitem.scrollHeight + limiteinftexto - offset)) {
		textitem.style.top = parseInt(textitem.style.top) - brusquedad;
	}
	temps = setTimeout('scrolldown()', lentitud);
}

function scrolltop()
{
	textitem.style.top = limitesuptexto;
}

function checkscroll()
{
	if ((textitem.scrollHeight + offset) >= (limiteinftexto + limitesuptexto)) {
		veure("slideline");
		veure("arrowup");
		veure("arrowdown");
	}
	else {
		amagar("slideline");
		amagar("arrowup");
		amagar("arrowdown");
	}
}

function inidragndrop() {
	textitem = document.getElementById('scrolltext');
	checkscroll();
}
