<!--
/*
All code Copyright (c) 2002 Dan Mount
*/
var intPicCount = astrPics.length - 1;
var intCurrentPic = 0;
var intDelay = 5000;
var intTimeoutID;
var strPicName;
var bolSwapAction = true;
var webBrowser = navigator.appName;

function picSwapAbsolute(imgImageToRotate, bolAction, intIndex) {
	clearTimeout(intTimeoutID);
	intCurrentPic = intIndex;
	picSwap(imgImageToRotate, bolAction, 0);
}

function statusUpdate(strText) {
	window.status = strText;
	return true;
}

function picSwap(imgImageToRotate, bolAction, intDirection) {
	bolSwapAction = bolAction;
	strPicName = imgImageToRotate;
	
	if (intPicCount < 1) {
		 return true;
	}
	
	if (intCurrentPic + intDirection < 0) {
		intCurrentPic = intPicCount;
	}
	else if (intCurrentPic + intDirection > intPicCount) {
		intCurrentPic = 0
	}
	else {
		intCurrentPic = intCurrentPic + intDirection
	}
	document[strPicName].src = astrPics[intCurrentPic];
	if (webBrowser == 'Netscape') {
		continuePicSwap();
	}
	else {
		document[strPicName].onload = continuePicSwap;
	}
	return true;
}

function continuePicSwap() {
	if (bolSwapAction == true) {
		sleep();
	}
	return true;
}

function picSwapPlay() {
	clearTimeout(intTimeoutID);
	picSwap(strPicName, true, 1);
}

function picSwapPause() {
	clearTimeout(intTimeoutID);
	picSwap(strPicName, false, 0);
}

function picSwapRewind() {
	clearTimeout(intTimeoutID);
	picSwap(strPicName, bolSwapAction, -1);
}

function picSwapFastForward() {
	clearTimeout(intTimeoutID);
	picSwap(strPicName, bolSwapAction, 1);
}

function sleep() {
	intTimeoutID = setTimeout('picSwap(strPicName, bolSwapAction, 1)', intDelay);
}

function genTumbnails() {
	if (intPicCount < 1) {
		 return true;
	}
	for (i=0; i <= intPicCount; i++) {
		document.write('<a href="javascript:picSwapAbsolute(strPicName , false,' + i + ')"><img src="' + astrThumbnails[i] + '" alt="Click To View" border="0"></a>');
	}
}
//-->