﻿
        //create an image scroller object
        var imageScroller_96432915;
		
        //delay all code execution untill after page load
		addAnEvent(window, "load", loadScroller_96432915);
		
            function loadScroller_96432915() {
        
		        imageScroller_96432915 = new ImageScroller("imageScrollerFrame_96432915", "imageScrollerImageRow_96432915");
		        //**    [begin] Modify these to change your images  **//
				   imageScroller_96432915.setThumbnailWidth(132);
imageScroller_96432915.setThumbnailHeight(98);
imageScroller_96432915.setScrollSpeed(21);
imageScroller_96432915.setScrollAmount(100);
imageScroller_96432915.setThumbsShown(3);
imageScroller_96432915.setAutoLoop("True");
imageScroller_96432915.setScrollType(1);
imageScroller_96432915.setThumbnailPadding(0);
imageScroller_96432915.addThumbnail("images/0007.jpg", "http://www.hydroquebec.com/fr", "Hydro-Québec", "");
imageScroller_96432915.addThumbnail("images/0001.jpg", "http://www.bostonpizza.com/fr/?q=bostonpizza_localisateur_de_restaurant_et_menus&city=Ste-Julie&prov=qc", "Boston Pizza", "");
imageScroller_96432915.addThumbnail("images/0002.jpg", "http://www.timhortons.com/fr/goodwill/local-programs.html", "Tim Hortons", "");
imageScroller_96432915.addThumbnail("images/0003.jpg", "http://www.gourmetnantel.com/sucres.php", "Tradition Ste-Julie", "");
imageScroller_96432915.addThumbnail("images/0004.jpg", "http://www.assnat.qc.ca/fra/Membres/notices/d/dias1.shtml", "Simon-Pierre Diamond", "");
imageScroller_96432915.addThumbnail("images/0005.jpg", "http://www.ville.sainte-julie.qc.ca", "Ville de Sainte-Julie", "");
imageScroller_96432915.addThumbnail("images/0006.jpg", "http://www.kottlumber.com/montreal/index-fr.html", "Matériaux KOTT", "");

				//**    [end]   Modify these to change your images  **//			    			    
			    imageScroller_96432915.enableThumbBorder(false);
			    imageScroller_96432915.setClickOpenType(1);
			    imageScroller_96432915.setNumOfImageToScroll(1);
			    imageScroller_96432915.renderScroller();
	        };
			
			timer_96432915 = window.setTimeout("scrollImages_96432915()", 300);
			
var direction_96432915;
function scrollImages_96432915() {
	//set how many thumb shown, 3 in this example, modify to your number
	var thumbsShown = imageScroller_96432915.getThumbsShown();
	var currentThumbnail = imageScroller_96432915.getCurrentThumbIndex();
	var lastThumbnail = imageScroller_96432915.getThumbnailCount();
	var scrollType = imageScroller_96432915.getScrollType();
	
	//0=forward, 1=backward
	//if we are at image 1, go forward, if we are on last one, go backward
	if (currentThumbnail == 1) {
		direction_96432915 = 0;
	} else if (currentThumbnail == ((lastThumbnail + 1) - thumbsShown)) {
		direction_96432915 = 1;
	}
	//move the scroller based on direction
	if (direction_96432915 == 0) {
		if (scrollType == 0) {
			imageScroller_96432915.scrollForward();
		} else {
			imageScroller_96432915.scrollUp();
		}
	} else {
		if (scrollType == 0) {
			imageScroller_96432915.scrollReverse();
		} else {
			imageScroller_96432915.scrollDown();
		}
	}
	//call it again for next scroll
	timer_96432915 = window.setTimeout("scrollImages_96432915()", 1500);
};

