
//create an image scroller object
var imageScroller_35203120;

//delay all code execution untill after page load
addAnEvent(window, "load", loadScroller_35203120);

    function loadScroller_35203120() {

        imageScroller_35203120 = new ImageScroller("imageScrollerFrame_35203120", "imageScrollerImageRow_35203120");
        //**    [begin] Modify these to change your images  **//
		
		    imageScroller_35203120.setThumbnailWidth(240);
imageScroller_35203120.setThumbnailHeight(145);
imageScroller_35203120.setScrollSpeed(21);
imageScroller_35203120.setScrollAmount(1);
imageScroller_35203120.setThumbsShown(3);
imageScroller_35203120.setAutoLoop("True");
imageScroller_35203120.setScrollType(0);
imageScroller_35203120.setThumbnailPadding(3);
imageScroller_35203120.addThumbnail("images/thmb_0001.jpg", "images/orig_0001.jpg", "", "");
imageScroller_35203120.addThumbnail("images/thmb_0002.jpg", "images/orig_0002.jpg", "", "");
imageScroller_35203120.addThumbnail("images/thmb_0003.jpg", "images/orig_0003.jpg", "", "");
imageScroller_35203120.addThumbnail("images/thmb_0004.jpg", "images/orig_0004.jpg", "", "");
imageScroller_35203120.addThumbnail("images/thmb_0005.jpg", "images/orig_0005.jpg", "", "");
imageScroller_35203120.addThumbnail("images/thmb_0006.jpg", "images/orig_0006.jpg", "", "");
imageScroller_35203120.addThumbnail("images/thmb_0007.jpg", "images/orig_0007.jpg", "", "");
imageScroller_35203120.addThumbnail("images/thmb_0008.jpg", "images/orig_0008.jpg", "", "");

		
	    //**    [end]   Modify these to change your images  **//			    			    
	    imageScroller_35203120.enableThumbBorder(false);
	    imageScroller_35203120.setClickOpenType(1);
	    imageScroller_35203120.setNumOfImageToScroll(1);
	    imageScroller_35203120.renderScroller();
    };
	
	timer_35203120 = window.setTimeout("scrollImages_35203120()", 300);

var direction_35203120;
function scrollImages_35203120() {
	//set how many thumb shown, 3 in this example, modify to your number
	var currentThumbnail = imageScroller_35203120.getCurrentThumbIndex();
	var lastThumbnail = imageScroller_35203120.getThumbnailCount();
	
	var scrollType = imageScroller_35203120.getScrollType();
	
	if (scrollType == 0) {
		var currentPosition = parseInt(document.getElementById("imageScrollerImageRow_35203120").style.left);
		var endPosition = -1 * (parseInt(document.getElementById("imageScrollerImageRow_35203120").style.width) - parseInt(document.getElementById("imageScrollerFrame_35203120").style.width));
	} else {
		var currentPosition = parseInt(document.getElementById("imageScrollerImageRow_35203120").style.top);
		var endPosition = -1 * imageScroller_35203120.iNumOfThumbsShownHeightTotal_;
	}
	
	//0=forward, 1=backward
	//if we are at image 1, go forward, if we are on last one, go backward
	if (currentPosition > (endPosition + 2)) {
		direction_35203120 = 0;
	} else {
		direction_35203120 = 1;
	}
	
	//move the scroller based on direction
	if (direction_35203120 == 0) {
		if (scrollType == 0) {
			imageScroller_35203120.smoothScrollForward();
		} else {
			imageScroller_35203120.smoothScrollUp();
		}
	} else {
		if (scrollType == 0) {
			imageScroller_35203120.smoothScrollReverse();
		} else {
			imageScroller_35203120.smoothScrollDown();
		}
	}
	//call it again for next scroll
	timer_35203120 = window.setTimeout("scrollImages_35203120()", 1);
};

