
function showPhoto(action, id, width, height) {
    
  var windowwidth  = width  + 35 + 180;
  var windowheight = height + 35 + 120;
  var windowtop    = (screen.height - windowheight) /2;
  var windowleft   = (screen.width - windowwidth) /2;
    
  window.open("gallery.php?action="+action+"&id="+id+"&width="+width+"&height="+height,"gallery",'toolbar=0,location=0,width='+windowwidth+',height='+windowheight+',scrollbars=0,resizable=0,top='+windowtop+',left='+windowleft);
}

function showImage(action, id, width, height) {

  var windowwidth  = width  + 1;
  var windowheight = height + 2;
  var windowtop    = (screen.height - windowheight) /2;
  var windowleft   = (screen.width - windowwidth) /2;
    
  window.open("showimage.php?action="+action+"&id="+id,"showimage",'toolbar=0,location=0,width='+windowwidth+',height='+windowheight+',scrollbars=0,resizable=0,top='+windowtop+',left='+windowleft);
}
