var h_speed=10; // scroll speed (bigger = faster)
var h_dR=false; // reverse direction

// Horizontal Scroller Javascript
var h_step = 2; 
function h_objWidth(obj) {if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 0;} 
function h_objHeight(obj) {if(obj.offsetHeight) return obj.offsetHeight; if (obj.clip) return obj.clip.height; return 0;} 
function h_scrF(i,sW,eW,varPausa)
{
	if (eval(varPausa)==false)
	{
		var x=parseInt(i.left)+(h_dR? h_step: -h_step); if(h_dR && x>sW)x=-eW;else if(x<2-eW)x=sW;i.left = x+'px';
	}
} 
function h_startScroll(sN,txt,varPausa)
{
	var scr=document.getElementById(sN); 
	var sW = h_objWidth(scr); 
	var sH = h_objHeight(scr)-6; 
	scr.innerHTML = '<div id="'+sN+'in" style="position:absolute; left:3px; height:'+sH+'px;">'+txt+'<\/div>'; 
	var sTxt=document.getElementById(sN+'in'); 
	var eW=h_objWidth(sTxt);
	// En relative la capa no calcula bien el ancho en Firefox 
	sTxt.style.position = "relative";
	//alert("anchura-TEXTO : "+ eW);
	sTxt.style.left=(h_dR? -eW : sW)+'px'; 
	//sTxt.style.top = '10px';
	//alert('CLIP: '+eW+'px,'+sH+'px ESTILO LEFT '+sTxt.style.left+' top '+ sTxt.style.top)
	sTxt.style.clip='rect(0px,'+eW+'px,'+sH+'px,0px)';
	setInterval(function() {h_scrF(sTxt.style,sW,eW,varPausa);},1000/h_speed);
}
//window.onload = addScrollers;
                  
