
//create an image scroller object
var imageScroller_24435038;

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

    function loadScroller_24435038() {

        imageScroller_24435038 = new ImageScroller("imageScrollerFrame_24435038", "imageScrollerImageRow_24435038");
        //**    [begin] Modify these to change your images  **//
		
		   imageScroller_24435038.setThumbnailWidth(141);
imageScroller_24435038.setThumbnailHeight(128);
imageScroller_24435038.setScrollSpeed(50);
imageScroller_24435038.setScrollAmount(2);
imageScroller_24435038.setThumbsShown(6);
imageScroller_24435038.setAutoLoop("True");
imageScroller_24435038.setScrollType(0);
imageScroller_24435038.setThumbnailPadding(0);
imageScroller_24435038.addThumbnail("img/baxi.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/cannon.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/creda.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/electrolux.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/flavel.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/hotpoint.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/new-world.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/parkinson_cowan.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/rangemaster.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/stoves.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/valor.jpg", "order-products.php", "", "");
imageScroller_24435038.addThumbnail("img/verine.jpg", "order-products.php", "", "");

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

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