﻿function slideShowCollectionProps(transitionType, transitionDuration)
{
	this.transitionType = transitionType;
	this.transitionDuration = transitionDuration;
}

function slideShowProps(random, currImage)
{
	this.random = random;
	this.currImage = currImage;
}

function image(path, linkUrl, showDuration, targetUrl)
{
	this.path = path;
	this.linkUrl = linkUrl;
	this.showDuration = showDuration;
	this.targetUrl = targetUrl;
}

function preLoadImages(numOfSlideshows)
{
	var completedSlideshows = 0;
	var index = 1;
	while (completedSlideshows < numOfSlideshows)
	{
		completedSlideshows = 0;
		for (var i = 1; i <= numOfSlideshows; i++)
		{
			if (slideShowCollection[i].length > index)
			{
				cachedImages[i][index] = new Image();
				cachedImages[i][index].src = slideShowCollection[i][index].path;
			}
			else {completedSlideshows++;}
		}
		index++;
	}
}
var numSlideShows = 1;
var transitionType = 3;
var transitionDuration = 2;
var slideShowNum = 1;
var pliIndex = -1;
var cachedImages = new Array(numSlideShows+1);
var isSameImage = new Array(numSlideShows+1);
var slideShowCollection = new Array(numSlideShows + 1);
slideShowCollection[0] = new slideShowCollectionProps(transitionType,transitionDuration);
var timeoutIds = new Array(numSlideShows);slideShowNum = 1;
cachedImages[slideShowNum] = new Array(3);
slideShowCollection[slideShowNum] = new Array(4);
slideShowCollection[slideShowNum][0] = new slideShowProps(true,999);
slideShowCollection[slideShowNum][1] = new image('SiteImg/fr1.jpg','#',15,'#');
slideShowCollection[slideShowNum][2] = new image('SiteImg/uc3.jpg','#l',15,'#');
slideShowCollection[slideShowNum][3] = new image('SiteImg/uc1.jpg','#',15,'#');
slideShowNum = 2;
cachedImages[slideShowNum] = new Array(3);
slideShowCollection[slideShowNum] = new Array(3);
slideShowCollection[slideShowNum][0] = new slideShowProps(true,999);
slideShowCollection[slideShowNum][1] = new image('img/1x1.gif','#',5,'#');
slideShowCollection[slideShowNum][2] = new image('img/1x1.gif','#',4,'#');
slideShowNum = 3;
cachedImages[slideShowNum] = new Array(2);
slideShowCollection[slideShowNum] = new Array(2);
slideShowCollection[slideShowNum][0] = new slideShowProps(true,999);
slideShowCollection[slideShowNum][1] = new image('img/1x1.gif','#',20,'#');