// JavaScript Document
var prevWindow = null ;

function closePhoto() {
	if (prevWindow) prevWindow.close() ;
}

function showPhoto(lnk, name) {
	width = 800 ; height = 600 ;
	
	if(prevWindow != null && ! prevWindow.closed) {
		prevWindow.document.location = lnk ;
	} else {
		prevWindow = window.open(lnk, name, "width=" + width +", height=" + (height+20)) ;
	}

	if(prevWindow.focus ) prevWindow.focus();
}



window.onunload = closePhoto ;