var speed = 4;
var crossobj = document.getElementById('basketBoxDataRightDataScroll');
var contentheight = crossobj.offsetWidth;

function movedown(){
	if (window.moveupvar)
		clearTimeout(moveupvar);
	if (parseInt(crossobj.style.left)>=(contentheight*(-1)+$(document).width()-70))
		crossobj.style.left=parseInt(crossobj.style.left)-speed+"px";
	    movedownvar=setTimeout("movedown()",20);
}

function moveup(){
	if (window.movedownvar)
		clearTimeout(movedownvar);
	if (parseInt(crossobj.style.left)<0)
		crossobj.style.left=parseInt(crossobj.style.left)+speed+"px";
	    moveupvar=setTimeout("moveup()",20);
}

function stopscroll(){
	if (window.moveupvar)
		clearTimeout(moveupvar);
	if (window.movedownvar)
		clearTimeout(movedownvar);
}

function movetop(){
	stopscroll();
	crossobj.style.left=0+"px";
}

function getcontent_height(){
    contentheight=crossobj.offsetWidth;
	window.onload=getcontent_height;
}

