var pictureWindow = 0

var oldstuff = parseInt(navigator.appversion) < 3

function makePictureWindow(filename,filetitle) {
	if ((pictureWindow == 0) || (pictureWindow.closed)) {
		pictureWindow = window.open("","sub","status,height=400,width=500,resizable")
		pictureWindow.moveTo(500,25)
	}
	// handle navigator2 which does not have an opener property
	if (!pictureWindow.opener) {
		pictureWindow.opener = window
	}
	// delay writing untill window exists in IE3
	displayPicture(filename,filetitle)
	if (!oldstuff) {
		// Old version of navigator has no focus control
		// window already open bring it to the front
		pictureWindow.focus()
	}
}

function displayPicture(filename,filetitle) {
	// assemble content for new window
	var newContent = "<HTML><HEAD><TITLE>Display Pix: "
	newContent += filetitle
	newContent += "</TITLE><link href='../styles/pop_pg.css' rel='stylesheet' type='text/css'/></HEAD>\n"
	newContent += "<BODY><table align ='center'><tr><td><img src='"
	newContent += filename
	newContent += "' class ='photoimg'><br />\n"
	newContent += " <p align ='center'><a href='javascript:window.close();'>Close This Window</a> </p></td></tr></table></body>\n"
	pictureWindow.document.write(newContent)
	pictureWindow.document.close()	// close layout stream
}