ListViewer={
	viewerLoc: 0,
	contentPos: 0,
	intervalId: 0,
	extendedListLength: 0, //should be list length * li width - slider_container width
	scrollLength: .5107, //should be li width divided by extendeListLength
	
	initialize:function(){
		//CSS hide if we're using javascript
		var sliderContainer = document.getElementById('slider_container');
		sliderContainer.style.overflow = "hidden";
		
		//And show
		var leftArrow = document.getElementById('leftarrow');
		leftArrow.style.visibility="visible";
		
		var rightArrow = document.getElementById('rightarrow');
		rightArrow.style.visibility="visible";
		
	},
	
	scrollLeft:function(){
		ListViewer.smoothScroll(ListViewer.scrollLength, -1);
	},

	scrollRight:function(){
		ListViewer.smoothScroll(ListViewer.scrollLength, 1);
	},
	
	smoothScroll:function(xUnits, dir){
		var sliderContents = document.getElementById('slider_contents');
		//Stop scrolling if beyond limits
		ListViewer.viewerLoc = ListViewer.viewerLoc + dir*xUnits;
		if (ListViewer.viewerLoc < 0) ListViewer.viewerLoc = 0;
		if (ListViewer.viewerLoc > 1) ListViewer.viewerLoc = 1;
		
		//Find width to move list contents
		var absoluteLoc = -1 * ListViewer.extendedListLength * ListViewer.viewerLoc;
		
		//Stop scrolling if we still are
		window.clearInterval(ListViewer.intervalId);
		
		//Start scrolling at set intervals
		ListViewer.intervalId = window.setInterval(function(){
			var step = .1;
			//Find current position of list contents and move it 10% of the distance
			ListViewer.contentPos = ListViewer.contentPos - Math.floor(step * (ListViewer.contentPos - absoluteLoc));
			if (Math.abs(ListViewer.contentPos - absoluteLoc) < (1 / step) && Math.abs(ListViewer.contentPos - absoluteLoc) >= 1){
				if (dir > 0) ListViewer.contentPos = ListViewer.contentPos - 1;
				else ListViewer.contentPos = ListViewer.contentPos + 1;
			}
			else if (Math.abs(ListViewer.contentPos - absoluteLoc) < 1) ListViewer.contentPos = absoluteLoc;
			sliderContents.style.left=ListViewer.contentPos + "px";
			//stop once we've reached the absolute point
			if (ListViewer.contentPos == absoluteLoc) window.clearInterval(ListViewer.intervalId);
		}, 10);
	}	
};


		
		