function popupWindow (url, width, height) {
  var screenX = Math.floor ((screen.width + width) / 2);
  var screenY = Math.floor ((screen.height + height) / 2);

  window.open (url, "", "width=" + width + ",height=" + height, ",screenX=" + screenX + ",screenY=" + screenY);
}
