
timerIDScroll = null;
var active = 0;

function ScrollUpTexto(speed){
    	if(document.getElementById){
    		if(parseInt(obj[active].style.top) < 0){
    			obj[active].style.top = parseInt(obj[active].style.top) + speed + "px";
			}
    		timerIDScroll = setTimeout("ScrollUpTexto("+speed+")",32);
    	}
}

function ScrollDownTexto(speed){
    	if(document.getElementById){
    		if(parseInt(obj[active].style.top) > document.getElementById('Texto').offsetHeight - obj[active].offsetHeight){
    			obj[active].style.top = parseInt(obj[active].style.top) - speed + "px";
			}
    		timerIDScroll = setTimeout("ScrollDownTexto("+speed+")",32);
    	}
}

function ScrollStopTexto(){
    	if(document.getElementById){
    		clearTimeout(timerIDScroll);
    	}
}

function ScrollPageInit() {
    	if(document.getElementById){
    		obj = document.getElementById("Texto").getElementsByTagName("div");
    		obj['ContenidoTexto'].style.visibility = "visible";
    		obj['ContenidoTexto'].style.top = 0;
    	}
    	if(document.addEventListener){
    		for(i=0;i<document.getElementsByTagName('a').length;i++){
    			document.getElementsByTagName('a')[i].style.position = "relative";
			}
    	}
}


