function PhotoItem(caption,folder,orientation)
{
	this.caption = caption;
	this.folder = folder;
	this.orientation = orientation;
}

function ShowLargeImage(src)
{
	window.open(src,"Image");
}

function DisplayCopyright()
{
	var Year = new Date();
	var Text = document.getElementById('divYear');
	
	Text.innerHTML = "&#169; Copyright 2007-" + Year.getFullYear() + " Mark Fritsche Designs";
}

function InitilizePage(page)
{
	DisplayCopyright();
	BuildMenu(page);
	BuildPhotoLinks();
}

function BuildPhotoLinks()
{
	
	var Photos = document.getElementById("divPhotos");
	var i;
	var sb = new String();
	
	sb = "<table width='100%' class='content'>"
	
	if (photoArray.length > 0)
	{
		
		for (i=0;i<photoArray.length;i++)
		{
			if (((i+1) % 2) > 0)
			{
				sb = sb + "<tr>\n";
				sb = sb + "<td width='50%' align='center'><a href='FurnitureProjects\\" + photoArray[i].folder + ".html'><img id='img" + (i+1) + "' class='" + photoArray[i].orientation + "' src='Images\\Normal\\" + photoArray[i].folder + "\\Image1.JPG'><br />" + photoArray[i].caption + "</a></td>\n";
			}
			else
			{
				sb = sb + "<td width='50%' align='center'><a href='FurnitureProjects\\" + photoArray[i].folder + ".html'><img id='img" + (i+1) + "' class='" + photoArray[i].orientation + "' src='Images\\Normal\\" + photoArray[i].folder + "\\Image1.JPG'><br />" + photoArray[i].caption + "</a></td>\n";
				sb = sb + "</tr>\n";
			}
		}
		
		if ((photoArray.length % 2) > 0) 
		{
			sb = sb + "<td width='50%' align='center'>&nbsp;</td>";
			sb = sb + "</tr>\n";
		}
		sb = sb + "</table>"
	}

	Photos.innerHTML = sb.toString();
	
}
