
var scrollingContent='DEFAULT CONTENT';
var totalWidth='800px';                 
var pxSpeed = 2;    //reduce left px by this  

var speed = pxSpeed; 
var cWidth;
var marquee; 


function scroller(){
	if (document.getElementById) {	
		marquee = document.getElementById("marquee");		
		marquee.style.left=(parseInt(totalWidth)+10)+"px"; 		
		marquee.innerHTML='<span id="scroller_span">'+scrollingContent+'</span>'; 		
		cWidth = document.getElementById("scroller_span").offsetWidth; 
		//timed execution of moveScroller every 25milliseconds
		cWidth = 1500;
		//alert("cWidth "+cWidth);
		
		timerSet=setInterval("moveScroller()",25);
	}	
} 

function moveScroller(){
	marquee.style.left = (parseInt(marquee.style.left)>(-10 - cWidth)) ?parseInt(marquee.style.left)-speed+"px" : parseInt(totalWidth)+10+"px";
} 

//window.onload=scroller;
