
//create an image scroller object
var imageScroller_44537877;

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

    function loadScroller_44537877() {

        imageScroller_44537877 = new ImageScroller("imageScrollerFrame_44537877", "imageScrollerImageRow_44537877");
        //**    [begin] Modify these to change your images  **//
		
		   imageScroller_44537877.setThumbnailWidth(96);
imageScroller_44537877.setThumbnailHeight(128);
imageScroller_44537877.setScrollSpeed(21);
imageScroller_44537877.setScrollAmount(2);
imageScroller_44537877.setThumbsShown(3);
imageScroller_44537877.setAutoLoop("True");
imageScroller_44537877.setScrollType(1);
imageScroller_44537877.setThumbnailPadding(3);
imageScroller_44537877.addThumbnail("images/thmb_0001.jpg", "images/orig_0001.jpg", "", "");
imageScroller_44537877.addThumbnail("images/thmb_0002.jpg", "images/orig_0002.jpg", "", "");
imageScroller_44537877.addThumbnail("images/thmb_0003.jpg", "images/orig_0003.jpg", "", "");
imageScroller_44537877.addThumbnail("images/thmb_0004.jpg", "images/orig_0004.jpg", "", "");
imageScroller_44537877.addThumbnail("images/thmb_0005.jpg", "images/orig_0005.jpg", "", "");
imageScroller_44537877.addThumbnail("images/thmb_0006.jpg", "images/orig_0006.jpg", "", "");

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

var direction_44537877;
function scrollImages_44537877() {
	//set how many thumb shown, 3 in this example, modify to your number
	var currentThumbnail = imageScroller_44537877.getCurrentThumbIndex();
	var lastThumbnail = imageScroller_44537877.getThumbnailCount();
	
	var scrollType = imageScroller_44537877.getScrollType();
	
	if (scrollType == 0) {
		var currentPosition = parseInt(document.getElementById("imageScrollerImageRow_44537877").style.left);
		var endPosition = -1 * (parseInt(document.getElementById("imageScrollerImageRow_44537877").style.width) - parseInt(document.getElementById("imageScrollerFrame_44537877").style.width));
	} else {
		var currentPosition = parseInt(document.getElementById("imageScrollerImageRow_44537877").style.top);
		var endPosition = -1 * imageScroller_44537877.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_44537877 = 0;
	} else {
		direction_44537877 = 1;
	}
	
	//move the scroller based on direction
	if (direction_44537877 == 0) {
		if (scrollType == 0) {
			imageScroller_44537877.smoothScrollForward();
		} else {
			imageScroller_44537877.smoothScrollUp();
		}
	} else {
		if (scrollType == 0) {
			imageScroller_44537877.smoothScrollReverse();
		} else {
			imageScroller_44537877.smoothScrollDown();
		}
	}
	//call it again for next scroll
	timer_44537877 = window.setTimeout("scrollImages_44537877()", 1);
};
