
// defaults
var t; // the timeout
var start_position = 20; // the position of the text left
var scrolling_limit = -250;
var position = start_position;

Event.observe(window, 'load', function() {
	
	playVideo(332, 215);
	
	if ($('ticker') && $('ticker_text')) {
		start_position = 20; //$('ticker').offsetWidth ;
		scrolling_limit = $('text_holder').offsetWidth * -1;
		//$('ticker_text').style.left = '300px';
		position = start_position;
		$('ticker_text').onmouseover = function() { pause(); }
		$('ticker_text').onmouseout = function() { scroller(); }
		scroller();
	}
	
});


function scroller() {
	position--;
	if (position < scrolling_limit) {
		position = start_position;
	}
	$('ticker_text').style.left = position + 'px';
	t = setTimeout('scroller()', 40);
}

function pause() {
	clearTimeout(t);
}