// SCRIPT TO OPEN ONE NEW WINDOW AT A TIME WITH A PHOTO
/*****************************************************************************
Access this script by enclosing a thumbnail photo in an anchor link like this:

<a href="index.htm" onclick="openWindow('v','photo1.jpg'); return false">
<img src="images/job_photos/photo1_thumb.jpg" alt="Photo 1" />
</a>

In the above example, after "openWindow," 'v' is used for vertical photos,
'h' should be used for horizontal photos

The directory where photos are located is set in the script below using the
variable "directory"
******************************************************************************/

photoWindow = new Object;
photoWindow.closed = true;

// CHANGE directory AS NEEDED
var directory = "images/projects";

function openWindow(orientation,photoName) {
	if(!photoWindow.closed) {
		photoWindow.close();
	}
	var width = 660;
	var height = 510;

	if(orientation == "v") {
		width = 500;
		height = 670;
	}

	var thePhoto = directory + "/" + photoName;
	photoWindow = window.open(thePhoto,"","top=0,left=0,width=" + width + ",height=" + height);
}
