function ShowThumbnail (Thumbnail){
/* Function to change the source of the thumbnail placeholder */

	// define relative path to project thumbnails directory
	var PathToThumbnails = "images/projects";
	
	// build the thumbnail path from relative path and thumbnail filename
	ThumbnailSrc = PathToThumbnails + "/" + Thumbnail;

	// change the source of the thumbnail placeholder to the thumbnail path
	PhotoGallery.ThumbnailPlaceholder.src = ThumbnailSrc;
}

function ShowFullSize (Image){
/* Function to change the source of the full size image placeholder */

	// define relative path to project images directory
	var PathToImages = "images/projects";
	
	// build the image path from relative path and image filename
	ImageSrc = PathToImages + "/" + Image;

	// change the source of the image placeholder to the image path
	PhotoGallery.FullSizePlaceholder.src = ImageSrc;
}


function ShowPhotoDetails (CurrentRow){
/* Function to change the source of the full size image placeholder */

	// determine number of project photos in array
	NumberPhotos = ProjectsArray.length;

	// define relative path to project images directory
	var PathToImages = "";
	
	var ArrayIndex = CurrentRow - 1;
	
	// build the image path from relative path and image filename
	ImageSrc = ProjectsArray[ArrayIndex].img;

	// change the source of the image placeholder to the image path
	PhotoGallery.FullSizePlaceholder.src = ImageSrc;

	// display the title and description
	Title.innerText = ProjectsArray[ArrayIndex].title;
	Descript.innerText = ProjectsArray[ArrayIndex].descript;
	
	// show previous and next buttons
	NextIndex = CurrentRow + 1;	

	if (NextIndex > NumberPhotos)
		NextIndex = 1;
	
	PrevIndex = CurrentRow - 1;
	if (PrevIndex < 1)
		PrevIndex = NumberPhotos;

	if (NumberPhotos > 1){
		NavPrev.innerHTML = "&lt;&lt;<a href='javascript:ShowPhotoDetails(" + PrevIndex + ")';>Prev</a>";	
		NavNext.innerHTML = "<a href='javascript:ShowPhotoDetails(" + NextIndex + ")';>Next</a>&gt;&gt;";
	}
}


