
function showPhotoWin(photosrc, mgx, mgy)
{  //open a new window with the photo

  var content;
  var Imgx, Imgy;
  var winx, winy;
  var winattrs;
  var win;
  
  Imgx = mgx + 50;
  Imgy = mgy + 70;
  
  winx = "width = " + Imgx;
  winy = "height = " + Imgy;
  winattrs = "location=0, menbar=0, toolbar=0, resizable=1, scrollbars=1, " + winx + ", " + winy;
   
  win = window.open ("", "PhotoWin", winattrs);
  win.document.open();
  
  
  posx = (screen.width/2) - (Imgx/2);
  posy = (screen.height/2) - (Imgy/2);
  
  win.resizeTo (Imgx, Imgy);
  win.moveTo (posx, posy);
  
  content = 
	  '<HTML>' +
	   '<head>' +
	    '<title>Photos</title>' +
	   '</head>' +
	   '<body>' +
	     '<img src=' + photosrc + '>' +
	   '</body>' +
	  '</HTML>';
  
  
  win.document.write (content);
}

