function repositionLeft() {
	var node = document.getElementById('scrollId');
	var w = parseFloat(node.firstChild.style.width);
	var left = parseFloat(node.style.left);
	var child;
	while (left < 0) {;
		child = node.firstChild;
		node.removeChild(child);
		node.appendChild(child);
		left = left+w;
	}
	node.style.left=left+'px';
}
function repositionRight() {
	var node = document.getElementById('scrollId');
	var w = parseFloat(node.firstChild.style.width);
	var left = parseFloat(node.style.left);
	var width = parseFloat(node.style.width);
	width = width+left-w*4;
	var child;
	while (width > 0) {
		child = node.lastChild;
		node.removeChild(child);
		node.insertBefore(child,node.firstChild);
		width -= w;
		left -=w;
	}
	node.style.left=left+'px';
}
function scrollingLeft() {
	var node = document.getElementById('scrollId');
	var w = parseFloat(node.firstChild.style.width);
	var left = parseFloat(node.style.left);
	var width = parseFloat(node.style.width);
	width -=w*4;
	if(width > w*4) width=-w*4;
	else width = -width;
	node.style.left=(left-w/2)+'px';
	if(left-w/2 > width) {
		setTimeout("scrollingLeft()",100);
	}
}
function scrollingRight() {
	var node = document.getElementById('scrollId');
	var w = parseFloat(node.firstChild.style.width);
	var left = parseFloat(node.style.left);
	var width = parseFloat(node.style.width);
	var right = width+left-w*4;
	width -=w*4;
	if(width > w*4) width=w*4;
	node.style.left=(left+w/2)+'px';
	if(right+w/2 < width) {
		setTimeout("scrollingRight()",100);
	}
}
function scrollLeftD() {
	repositionLeft();
	scrollingLeft();
}
function scrollRightD() {
	repositionRight();
	scrollingRight();
}
