scrollList=new Array();
scrollList['flechaAbajo']=new Array();
scrollList['flechaArriba']=new Array();

arrTextDown = new Array('text_container', 3);
arrTextUp = new Array('text_container', -3);

function scrollListFlush()
{
	while (scrollList['flechaAbajo'].length > 0) {
		scrollList['flechaAbajo'].pop();
	}
	while (scrollList['flechaArriba'].length > 0) {
		scrollList['flechaArriba'].pop();
	}
}

function getEl(elementId)
{
    return document.getElementById(elementId);
}

function iniciaScroll(id)
{
    scrollDivs=new Array();
    velDivs=new Array();
  
    scrollDivs.push(getEl(scrollList[id][0][0]));
    velDivs.push(scrollList[id][0][1]);
  
    identificador=setInterval('scrollNow()', 50);
}
 
function detieneScroll()
{
    clearInterval(identificador);
}
 
function scrollNow()
{
    for(key in scrollDivs)
    {
    var desplazamientoActual=scrollDivs[key].scrollTop;
    var nuevoDesplazamiento=desplazamientoActual+velDivs[key];
    scrollDivs[key].scrollTop=nuevoDesplazamiento;
    }
} 



