<!--
// these two varibles along with the function below "runSlideShowBool()" are used to selectively activate the slideshow from a dreamweaver template
var slideShowPresent = true;
var autoPlay = false;
<!--

<!-- Original:  CodeLifter.com (support@codelifter.com) -->
<!-- Web Site:  http://www.codelifter.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;
// Duration of crossfade (seconds)
var crossFadeDuration = 1;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'art/slideshow/1.jpg';
Pic[1] = 'art/slideshow/2.jpg';
Pic[2] = 'art/slideshow/3.jpg';
Pic[3] = 'art/slideshow/4.jpg';
Pic[4] = 'art/slideshow/5.jpg';
Pic[5] = 'art/slideshow/6.jpg';
Pic[6] = 'art/slideshow/7.jpg';
Pic[7] = 'art/slideshow/8.jpg';
Pic[8] = 'art/slideshow/9.jpg';

var Caption = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Caption[0] = 'Caption 1';
Caption[1] = 'Caption 2';
Caption[2] = 'Caption 3';
Caption[3] = 'Caption 4';
Caption[4] = 'Caption 5';
Caption[5] = 'Caption 6';
Caption[6] = 'Caption 7';
Caption[7] = 'Caption 8';
Caption[8] = 'Caption 9';

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
	MM_setTextOfLayer('photoCaption','', Caption[j]);
	if (document.all) {
		document.images.SlideShow.style.filter="blendTrans(duration=2)";
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();
	}	
	document.images.SlideShow.src = preLoad[j].src;	
	if (document.all) {
		document.images.SlideShow.filters.blendTrans.Play();
	}
	j = j + 1;
	if (j > (p - 1)) j = 0;
	t = setTimeout('runSlideShow()', slideShowSpeed);
	autoPlay = true;
}
// Function to drive the "previous" and "next" buttons
function stepSlideShow(d) {
	if (d == 1 && j == p-1) {
	// If we're going forward and are at the end of the range of pictures, roll over the beginning
		j = 0;
	} else if (d == -1 && j == 0) {
	// If were going backward and are at the start of the range, roll over to the last picture	
		j = p-1;
	} else {
	// Else just increment the picture number.
		j = j + d;
	}
	// Change the photo caption
	MM_setTextOfLayer('photoCaption','', Caption[j]);
	if (document.all) {
		document.images.SlideShow.style.filter="blendTrans(duration=2)";
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();
	}	
	document.images.SlideShow.src = preLoad[j].src;	
	if (document.all) {
		document.images.SlideShow.filters.blendTrans.Play();
	}
	// Turn off the autoplay variable, this is used in the movieControl() function
	autoPlay = false;
}

function movieControl(c) {
	if (c == 'stop') {
		// Halt the slideshow
		clearTimeout(t);
	} else if (c == 'play') {
		// Start the slideshow
		runSlideShow();
	} else if (c == 'prev') {
		// If the slideshow is running we have to halt it and then increment the picture number back down one
		// Because the slide show function incremented it up the last time it ran.
		clearTimeout(t);
		if (autoPlay == true) { j-- };
		// Then we invoke the single step function
		stepSlideShow(-1)
	} else if (c == 'next') {
		// If the slideshow is running we have to halt it and then increment the picture number back down one
		// Because the slide show function incremented it up the last time it ran.
		clearTimeout(t);
		if (autoPlay == true) { j-- };
		// Then we invoke the single step function
		stepSlideShow(1)
	}
}
  
function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

//-->