	var imgscrollerobj = "thumbsContainer";
	var imgscrollwidth = 480;
	
	var imgileftpos = 0;
	var imgtimer;
	var imgtempmove;
	var scwidth = 0;
	var sc;
	var sb;
	var sbtop;
	var imgfullscroll = 0;
	var movespeed = 5;
	var intervalspeed = 1.0; //2.2
	
	function positionImageScroller() {
	}
	
	function prepareImageScroller() { 
		if(p(g("thumbsContainer").style.left) < 0) {
			imgileftpos = p(g("thumbsContainer").style.left);
		}
		
		imgscrollwidth = parseInt(g("thumbsMainContainer").offsetWidth);
		if(g("thumbTable").offsetWidth-imgscrollwidth>0) { 
			imgfullscroll = (parseInt(g("thumbTable").offsetWidth-imgscrollwidth)*-1);
		}
		
		if(imgfullscroll>=0) {
//			g('imageArrowsContainer').style.visibility = "hidden";
//			document.getElementById("imagedownarrow").style.visibility = "hidden";
//			document.getElementById("imageuparrow").style.visibility = "hidden";
//			document.getElementById("imagedownarrow").style.width = "0px";
//			document.getElementById("imageuparrow").style.width = "0px";
		}
	}

	function scrollright() {	imgtempmove = movespeed;
		if(parseInt(document.getElementById(imgscrollerobj).style.left)>=imgfullscroll) {
			imgtimer = setInterval("doimgscroll(1)", intervalspeed*10);
		}
	}

	function scrollleft() { var o = document.getElementById(imgscrollerobj);
		imgtempmove = movespeed;
		if(parseInt(o.style.left)>parseInt((o.offsetWidth*-1))) {
			imgtimer = setInterval("doimgscroll(0)", intervalspeed*10);
		}	
	}
	
	function doimgscroll(dir)
	{ 		
		if(imgfullscroll==0) { clearInterval(imgtimer); }
		var o = document.getElementById(imgscrollerobj);
		imgileftpos += (dir==0 ? + imgtempmove : - imgtempmove);
		o.style.left = imgileftpos + "px";
		
		if(dir==0) {
				if(parseInt(o.style.left)>0) {  
					clearInterval(imgtimer);
					o.style.left = 0 + "px";
					window.status = "cancelled";
				}
		}
		else { 
				if(parseInt(o.style.left)<imgfullscroll) {
					clearInterval(imgtimer);
					o.style.left = imgfullscroll + "px";
				}
		}
	}

	function cancelimgscroll() {
		clearInterval(imgtimer);
	}
	function alterimgspeed(faster) {
		imgtempmove = (faster==1 ? movespeedfast : movespeed);
	}
