
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+','
win = window.open(mypage,myname,settings)
}
function show_photo( pFileName, pTitle, Width, Height) {
 
// specify window parameters
var winl = (screen.width - Width) / 2;
var wint = (screen.height - Height) / 2;
 
  photoWin = window.open( "", "photo", "width="+ Width +",height="+ Height +",top="+wint+",left="+winl+",status=no,scrollbars=yes,resizable=no,screenX=20,screenY=40");
  
// wrote content to window
 photoWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n');
  photoWin.document.write('<html><head><title>' + pTitle + '</title></head>\n'); 
  photoWin.document.write('<BODY bgcolor="black" style="margin:0px;" onload="self.focus()" onBlur="self.close()">\n');
  photoWin.document.write('<img src="' + pFileName + '">\n');
  photoWin.document.write('</body></html>');
  photoWin.document.close(); 
 
// If we are on NetScape, we can bring the window to the front
if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();
}

