/*****************************************************
TRANSITION BETWEEN IMAGES */

	var preLoad = new Array();
	var currentImg = 0;
	var t;

	// Preload images
	function preloadImg() {
		for (i = 0; i < arrLength; i++) { 
			preLoad[i] = new Image();
			preLoad[i].src = imgArr[i];
		}
	}

	// Slideshow 
	function runSlideShow(filterFunction) {
		var filterable = false;

		// If Filters work 
		if ((document.images.SlideShow) && (document.images.SlideShow.style) && (document.images.SlideShow.style.filters)) {
			filterable = true;
			target = document.images.SlideShow;
		}

		if (document.getElementById("SlideShow")) {
			filterable = true;
			target = document.getElementById("SlideShow");
		}

		// Checks to make sure it's preloaded 
		if (preLoad[currentImg].complete) {
			if (filterable) {
				if (filterFunction == null) filterFunction = "blendTrans(duration=" + duration + ")"

				target.style.filter = filterFunction;

				if ((target.filters) && (target.filters[0])) {
					target.filters[0].Apply();
					target.filters[0].Play();
				}
			}

			document.images.SlideShow.src = preLoad[currentImg].src;

			currentImg = currentImg + 1;
			if (currentImg > (arrLength - 1)) currentImg = 0;

			t = setTimeout('runSlideShow()', speed);
		}
	}

