var tY=0
var tSpeed = 0;
var tLoop = true;

function tLewo() {
	tLoop=true;
	tSpeed=3;
	tMove();
}
function tPrawo() {
	tLoop=true;
	tSpeed=-3;
	tMove();
}
function tMove() {
	tY+=tSpeed;
	el = document.getElementById("thumbsContent");
	// --	
	var widthWindow = 360;
	var widthContent = (el.style.width.substring(0,(el.style.width.length-2)))*1;
	// --
	if (widthContent > widthWindow) {
		if (tY>0) {
			tY = 0;
			tNoScroll();
		} else if (tY < (widthContent-widthWindow)*(-1)) {
			tY = (widthContent-widthWindow)*(-1);
			tNoScroll();
		}
		// --
		el.style.left=tY+"px";		
		// --
		if (tLoop == true) {
			setTimeout(tMove, 20);
		}
	}
}
function tNoScroll() {
	tLoop = false;
}