// Netscape does not support filter effects so images just swap without a transition



var durationOfBannerDisplay = 5;	// in seconds (includes transition time)

var transitionDuration = 2;		// in seconds








// if you add an imageArray you need to add a linksArray also
var imageArray = new Array();

imageArray[0] = './images/lockpic1.jpg'
imageArray[1] = './images/lockpic2.jpg'
imageArray[2] = './images/lockpic3.jpg'
imageArray[3] = './images/lockpic4.jpg'
// add more here just increment index in [] brackets



var linksArray = new Array();

linksArray[0] = ''
linksArray[1] = ''
linksArray[2] = ''
linksArray[3] = ''
// add more here just increment index in [] brackets








var imageCount = imageArray.length;

var preLoadImages = new Array();	// preload images to avoid download wait

for (i = 0; i < imageCount; i++) 
{
	preLoadImages[i] = new Image();
	preLoadImages[i].src = imageArray[i];
}





var timerControl;		// set timer to recursively call BannerRotation function

var nextImageIndex = 0;		// default to first image
var transitionType = 22;	// default to first transition




function BannerRotation() 
{
	if (document.all) 	// old browser cheat 
	{
		document.images.BannerImages.style.filter="revealTrans(duration=" + transitionDuration + ",transition=" + transitionType + ")";
		document.images.BannerImages.filters.revealTrans.Apply();
	}



	document.images.BannerImages.src = preLoadImages[nextImageIndex].src;



	if (document.all) 		// old browser cheat test
	{
		document.images.BannerImages.filters.revealTrans.Play();
	}



	nextImageIndex = nextImageIndex + 1;	// increment image array index
	if (nextImageIndex > (imageCount - 1)) 
		nextImageIndex = 0;		// adjust for wrap around




	transitionType = transitionType + 1;	//increment transition affects reset at 24
	if (transitionType > 23) 
		transitionType = 0;		// adjust for wrap around




	// set loop for next rotation
	timerControl = setTimeout('BannerRotation()', (durationOfBannerDisplay * 1000));
}









function nextPage()
{
	for (x = 0; x < imageCount; x++) 
		if (document.images.BannerImages.src == preLoadImages[x].src)
			window.location = linksArray[x];
}

