var scroll_pos=new Array();
var scroll_salto=new Array();
var scroll_velocity=20;

function iniciar_scroll(sci){
	scroll_pos[sci]=0;
	scroll_salto[sci]=1;
	obj=layer("scroller"+sci)
	obj.style.display="block"
	hacer_scroll(sci);
}

function hacer_scroll(sci){
	obj1=layer("scroller"+sci);
	obj=layer("scroll_content"+sci);
	if (obj1){
	content_height=obj1.style.height;
	content_height=content_height.replace("px","");
	
	scroll_height=obj.offsetHeight;	
	
	scroll_pos[sci]=scroll_pos[sci]-scroll_salto[sci];
	if (scroll_pos[sci]<-scroll_height) scroll_pos[sci]=parseInt(content_height);	
	
	obj.style.top=scroll_pos[sci]+"px";
	
	setTimeout("hacer_scroll("+sci+")",scroll_velocity);
	}
}

function parar_scroll(sci){
	scroll_salto[sci]=0;
}
function continuar_scroll(sci){
	scroll_salto[sci]=1;
}