// Use: <a href="javascript:viewPhoto('images/photo.jpg')" />

function viewPhoto(img){
  width = 800 + 20;
  height = 600 + 20;
  file = escape(img);
  src = "includes/photo.inc.php/" + file + "?format=popup&file=" + file;
  str = "width=" + width + ",height=" + height;
  popup = window.open(src, "", str);
}

