// velocidad
var velocidad = 2;
var bufferVelocidad = velocidad;

// colocacion del div de texto dentro del div contenedor
colocacion = 0;
colocacionH = 0;
colocacionH2 = 290;
colocacionH3 = 580;

function parar(stop)
{
	if(stop)
	{
		velocidad = 0
	}
	else
		velocidad = bufferVelocidad
}

function scrollContinuo(){
	if (colocacion >= document.getElementById("contenido").offsetHeight*(-1))   //Alto total del contenido aunque no se vea
	{
		colocacion -= velocidad
		document.getElementById("contenido").style.top = colocacion
		setTimeout("scrollContinuo()",170)
	}
	else
	{	
		colocacion= document.getElementById("contenedor").offsetHeight	// Alto del contenedor
		scrollContinuo()
	}
}

function scrollContinuoH(){
	if (colocacionH >= document.getElementById("contenidoH").offsetWidth*(-1))   //Alto total del contenido aunque no se vea
	{
		colocacionH -= velocidad
		document.getElementById("contenidoH").style.left = colocacionH
	}
	else
	{	
		colocacionH= document.getElementById("contenedorH").offsetWidth	// Alto del contenedor
	}
	if (colocacionH3 >= document.getElementById("contenidoH3").offsetWidth*(-1))   //Alto total del contenido aunque no se vea
	{
		colocacionH3 -= velocidad
		document.getElementById("contenidoH3").style.left = colocacionH3
	}
	else
	{	
		colocacionH3= document.getElementById("contenedorH").offsetWidth	// Alto del contenedor
	}
	if (colocacionH2 >= document.getElementById("contenidoH2").offsetWidth*(-1))   //Alto total del contenido aunque no se vea
	{
		colocacionH2 -= velocidad
		document.getElementById("contenidoH2").style.left = colocacionH2
		setTimeout("scrollContinuoH()",170)
	}
	else
	{	
		colocacionH2= document.getElementById("contenedorH").offsetWidth	// Alto del contenedor
		setTimeout("scrollContinuoH()",170)
        //scrollContinuo()
	}
	
}