// JavaScript Document
function zoom(directori,arxiu, w, h) {
  var url = "control/arxius/"+ directori +"/" + arxiu;
  var winl = (screen.width-w)/2; 
  var wint = (screen.height-h)/2; 
  if (winl < 0) winl = 0; 
  if (wint < 0) wint = 0; 
  var settings = 'height=' + h + ','; 
  settings += 'width=' + w + ','; 
  settings += 'top=' + wint + ','; 
  settings += 'left=' + winl;

  //window.open(url, arxiu, settings);

  dato = "<html><head><title>Zoom > "+arxiu+"</title></head><body style='margin: 0; padding: 0;'><img src='" + url + "' /></body></html>";
  
  popup = window.open("","Zoom",settings);
  with (popup.document) {
    open();
    write(dato);
    close();
  }
}

