/* 

Mootools AttentionSlidebar

copyright: 
	http://www.attention.cc 2009
*/


/*Adding timed autoplay functionality*/

var totIncrement		= 0;
var increment			= 181;
//var maxRightIncrement	= increment*(-4);
var maxRightIncrement	= increment*(-15);
var autoplay = '1';
var timer;

// autoplay function
function testtimeout(){


	var fx = new Fx.Style('belt', 'margin-left', {
		duration: 1000,
		transition: Fx.Transitions.Back.easeInOut,
		wait: true
	});

	//increment = increment-6;

	if(totIncrement>maxRightIncrement){
		totIncrement = totIncrement-increment;
		fx.stop()
		fx.start(totIncrement);
	} else{

		totIncrement = totIncrement-maxRightIncrement;
		fx.stop()
		fx.start(totIncrement);
	}

	if(autoplay == '1'){
		timer = setTimeout("testtimeout()",6000);
	}

}