//__PRELOAD.JS__
//Preloads photos
//Called on onLoad event

//Change this number to reflect the amount of photos in the directory
var images=26;

function loadImages(directory)
{
	//Create the object to load the images
	loadingImage = new Image();

	//Create array to hold the SRC's
	imageSrc = new Array();

	for(var i=0;i<images;i++)
	{
		//Compensate for leading 0
		if(i<10)
		{
			imageSrc[i]="photos/"+directory+"/0"+i+".jpg";
		}
		else
		{
		    //Add the URL of each image to the array
			imageSrc[i]="photos/"+directory+"/"+i+".jpg";
		}
	}
	for(i=0;i<images;i++)
	{
		//Load the image
		loadingImage.src=imageSrc[i];
	}
}

function forceImages(directory)
{
for(var i=0;i<images;i++)
	{
	document.getElementById('force').src=forceImage(directory,i);
	}
}

function forceImage(directory,i)
{
//Create array to hold the SRC's
imageSrc = new Array();

	if(i<10)
	{
		return imageSrc[i]="photos/"+directory+"/0"+i+".jpg";
	}
	else
	{
		//Add the URL of each image to the array
		return imageSrc[i]="photos/"+directory+"/"+i+".jpg";
	}
}
