var timerID;
var Lobj;
var min_Width=600;
var client_width;

function stopMove()
{
	clearInterval(timerID);	
}
function turnleft(rate)
{
	clearInterval(timerID);
	timerID=setInterval("moveLeft("+rate+")",5);	
}
function turnright(rate)
{
	clearInterval(timerID);
	timerID=setInterval("moveRight("+rate+")",5);	
}
function moveLeft(rate)
{
	if(Lobj.style.left.slice(0,-2)<0)
	{
		Lobj.style.left=parseInt(Lobj.style.left.slice(0,-2))+parseInt(rate)+'px';
	}
}
function moveRight(rate)
{
	if(Lobj.style.left.slice(0,-2)>-(client_width-min_Width))
	{
		Lobj.style.left=parseInt(Lobj.style.left.slice(0,-2))-parseInt(rate)+'px';
	}		
}