var timerID;
var scrollDir=0;
var scrollSpeed=550/100;


function scrollIt(pControlId){
	var tmp=document.getElementById(pControlId).style.left
	if (tmp.indexOf('px')>0)
		tmp=tmp.substr(0,tmp.length-2);
		
	tmp-=scrollSpeed*scrollDir;
	
	var m=document.getElementById(pControlId).offsetWidth-110;
	
	if(tmp>0) tmp =0;
	if(tmp<-m) tmp =-m;
	
	document.getElementById(pControlId).style.left = tmp;
	timerID = setTimeout("scrollIt('" + pControlId + "')", 100);
}

function scrollStart(Dir, pControlId){
	scrollDir=Dir;
	scrollIt(pControlId);
}

function scrollStop(){
	if (timerID != null) clearTimeout(timerID);
}

