var t2 = null;
var imageWidth2 = -1;
function doScroll2(isRight, i)
{
	var container = document.getElementById(containerID + '2');
	var scroll = document.getElementById(scrollID + '2');
	var m = scroll.style.left == "" ? 0 : Number(scroll.style.left.replace('px', ''));
	if (imageWidth2 < 0)
		imageWidth2 = getArraySum(widths2, i - 1) + 12 * i;
	if (isRight) m -= 4; else m += 4;
	scroll.style.left = m + 'px';
	var containerWidth = Number(container.style.width.replace('px', ''));
	var scrollWidth = Number(scroll.style.width.replace('px', ''));
	if (Math.abs(m) == imageWidth2 || m + scrollWidth == containerWidth - 6 || m == 0)
	{
		clearTimeout(t2);
		scroll.onmouseover = new Function();
		scroll.onmouseout = new Function();
		var left = document.getElementById(leftScrollID + '2');
		var right = document.getElementById(rightScrollID + '2');
		right.style.display = m + scrollWidth == containerWidth - 6 ? "none" : "inline-block";
		left.style.display = m == 0 ? "none" : "inline-block";
		toggleScrollArrows(leftScroll2, rightScroll2, true);
		left.href = "javascript:scrollLeft(" + (i - scrollCount2) + ", 2);";
		right.href = "javascript:scrollRight(" + (i + scrollCount2) + ", 2);";
		imageWidth2 = -1;
	}
	else
		t2 = setTimeout('doScroll2(' + isRight + ', ' + i + ')', 0);
}
function pauseScroll2()
{
	clearTimeout(t2);
}
function resumeScroll2(isRight, i)
{
	t2 = setTimeout('doScroll2(' + isRight + ', ' + i + ')', 0);
}

