var scrollObj = null; // object

function startMove(objId, direction, interval) {
	scrollObj = document.getElementById(objId);
	if (direction=='right')
		doStepRight(interval);
	else if (direction=='left')
		doStepLeft(interval);
	else if (direction=='up')
		doStepUp(interval);
	else if (direction=='down')
		doStepDown(interval);
		
}
function doStepRight(interval) {
	scrollObj.style.left = (parseInt(scrollObj.style.left)-interval)+'px';
}			
function doStepLeft(interval) {
	if (parseInt(scrollObj.style.left) < 0) {
		scrollObj.style.left = (parseInt(scrollObj.style.left)+interval)+'px';
	} else {
		scrollObj.style.left = '0px';
	}
}
function doStepUp(interval) {
	if (parseInt(scrollObj.style.top) < 0) {
		scrollObj.style.top = (parseInt(scrollObj.style.top)+interval)+'px';		
	} else {
		scrollObj.style.top = '0px';		
	}
	

}			
function doStepDown(interval) {
	scrollObj.style.top = (parseInt(scrollObj.style.top)-interval)+'px';
}