var t_scroll
var mycount = 1;
document.observe("dom:loaded", configScroll );


function configScroll() {
	MyObj = $("seta_esquerda")
	MyObj.observe("mouseover" , vScrollLeft.bindAsEventListener(MyObj , "centro" ) );
	MyObj.observe( "mouseout" , stopScroll );

	MyObj = $("seta_direita")
	MyObj.observe("mouseover" , vScrollRight.bindAsEventListener(MyObj , "centro" ) );
	MyObj.observe( "mouseout" , stopScroll );

}

function vScrollLeft(vobj, vDestino) {
	t_scroll = new PeriodicalExecuter( internalScrollLeft.bind(  this , vDestino) , 0.01 )
}

function vScrollRight(vobj, vDestino) {
	t_scroll = new PeriodicalExecuter( internalScrollRight.bind(  this , vDestino) , 0.01 )
}


function internalScrollRight( pe ) {
	vDiv = $($A(arguments)[0]);
	vDiv.scrollLeft = vDiv.scrollLeft + 2;
}


function internalScrollLeft( pe ) {
	vDiv = $($A(arguments)[0]);
	vDiv.scrollLeft = vDiv.scrollLeft - 2;
}

function stopScroll() {
	t_scroll.stop();
} 