
var timeVariable;

function ContentScroll(id,dis,pos)
{
	var obj = document.getElementById(id)
	obj.scrollTop = obj.scrollTop + dis;
	if (pos)
	{
		obj.scrollTop = pos; 
	}
	else 
	{
		timeVariable = setTimeout(function() { ContentScroll(id, dis); }, 10); 
	}
}

function ContentScrollHorizontal(id,dis,pos)
{
	var obj = document.getElementById(id)
	obj.scrollLeft = obj.scrollLeft + dis;
	if (pos)
	{
		obj.scrollLeft = pos; 
	}
	else 
	{
		timeVariable = setTimeout(function() { ContentScrollHorizontal(id, dis); }, 10); 
	}
}
