
// javascript functions for displaying NBRC web photos
// 6/29/08
// Martin Meyers

// windowWasOpened boolean allows me to close open photo popup.
// If I don't do that, the next one opens behind the main browser window.
var windowWasOpened = false;
var nbrcPhotoWindow;
function openNewWindow(newLoc){
	<!-- alert("testing");-->
	if (windowWasOpened) {nbrcPhotoWindow.close()};

	nbrcPhotoWindow=open(newLoc,"photo_window","resizable,width=540,height=500");
	windowWasOpened=true;
}

// I don't want to leave the last photo window open after the user leaves the page.
// This will be called when event 'onunload' is triggered
function closeNewWindow(){
	if (windowWasOpened)
	{
		nbrcPhotoWindow.close()
	}
}