Event.observe(window, 'load', news_scroller, false);

var boxHeight;
var repeatHeight;
var stopScroll;
var x;

function news_scroller() {
	
	boxHeight = $('news_scroller').style.height.replace('px','');
	repeatHeight = $('news_scroller').scrollHeight; //get the current height so we know when to wrap
	$('news_scroller').innerHTML = $('news_scroller').innerHTML + $('news_scroller').innerHTML  //add a second copy so we can scroll down to the wrap point
	stopScroll = 0;
	x = setTimeout("scrollMe()",5000)
	// start scrolling after one second
}

function scrollMe() {
	clearTimeout(x)
	if(stopScroll==1) {
		return
	}
	$('news_scroller').scrollTop=$('news_scroller').scrollTop+1
	if($('news_scroller').scrollTop<=repeatHeight) {
		// keep on scrolin' 
		x = setTimeout("scrollMe()",50)
	}
	else { //we have hit the wrap point
		$('news_scroller').scrollTop=0
		x = setTimeout("scrollMe()",50)
	}
}
