/* WMSTI Photo Gallery objects/functionality */




function PhotoSet( imagePath )
{
	this.imagePath = imagePath;
	this.photos = [];
}

function Photo( title, thumbSrc, imageSrc )
{
	this.title = title;
	this.thumb = thumbSrc;
	this.image = imageSrc;
}



PhotoSet.prototype.AddPhoto = function ( title, thumbSrc, imageSrc )
{
	var index = this.photos.length;

	this.photos[ index ] = new Photo( title, thumbSrc, imageSrc );
}



PhotoSet.prototype.WriteThumbs = function( )
{
	// Iterate through photos and write thumb HTML for each
	for( var index = 0; index < this.photos.length; index++ )
	{
		document.write("<a href=\"" + this.imagePath + "/" + this.photos[ index ].image + "\" class=\"lightwindow\" params=\"\" rel=\"Set[Set]\" title=\"" + this.photos[ index ].title + "\" caption=\"\">" +
			"<img height=\"37\" width=\"37\" src=\"" + this.imagePath + "/" + this.photos[ index ].thumb + "\" alt=\"" + this.title + "\" />" +
			"</a> ");
	}

}
