// <![CDATA[

var headline1, headline2, headline3, headline4, scroller;
var obj4, obj5;
var i=0;
var j=0;
var k=0;
var l=0;
var speed=5; /*this is the scroll speed*/

function imgScrollLeft() {

	headline1.style.left=i+'px';	
	i--;
	if(i<= -(headline1.offsetWidth)) {
		i=747;
	}
	headline2.style.left=j+'px';	
	j--;
	if(j<= -(headline1.offsetWidth + headline2.offsetWidth)) {
		j=747-headline2.offsetWidth;
	}

	headline3.style.left=k+'px';	
	k--;
	if(k<= -(headline1.offsetWidth + headline2.offsetWidth + headline3.offsetWidth)) {
		k=747-headline2.offsetWidth-headline3.offsetWidth;
	}
	
	headline4.style.left=l+'px';
	l--;
	if(l<= -(headline1.offsetWidth + headline2.offsetWidth + headline3.offsetWidth+headline4.offsetWidth)) {
		l=747-headline2.offsetWidth-headline3.offsetWidth-headline4.offsetWidth;
	}
	scroller=setTimeout('imgScrollLeft()',speed);
}
function imgScrollRight() {

	headline1.style.left=i+'px';	
	i++;
	if(i> (headline1.offsetWidth+headline2.offsetWidth+headline3.offsetWidth+headline4.offsetWidth)) {
		i=-(headline4.offsetWidth);
	}
	headline2.style.left=j+'px';	
	j++;
	if(j> (headline2.offsetWidth+headline3.offsetWidth+headline4.offsetWidth)) {
		j=-(headline1.offsetWidth+headline4.offsetWidth)
	}

	headline3.style.left=k+'px';	
	k++;
	
	if(k> (headline3.offsetWidth+headline4.offsetWidth)) {
		k=-(headline1.offsetWidth+headline2.offsetWidth+headline4.offsetWidth)
	}
	
	headline4.style.left=l+'px';
	l++;
	if(l> (headline4.offsetWidth)) {
		l=-(headline1.offsetWidth+headline2.offsetWidth+headline3.offsetWidth+headline4.offsetWidth)
	}
	scroller=setTimeout('imgScrollRight()',speed);
}

window.onload=function() {
	headline1=document.getElementById('ticker0');
	headline2=document.getElementById('ticker1');
	headline3=document.getElementById('ticker2');
	headline4=document.getElementById('ticker3');
	
	obj4=document.getElementById('scrollLeft');
	obj5=document.getElementById('scrollRight');

	obj4.onmouseover=function(){
		imgScrollLeft();
	}
	obj4.onmouseout=function(){
		clearTimeout(scroller);
	}
	obj5.onmouseover=function(){
		imgScrollRight();
	}
	obj5.onmouseout=function(){
		clearTimeout(scroller);
	}
}

// ]]>