var popupwin = null;

function dopopup(wx, wy, url, name) {
  var nwidth = (window.screen.width / 2) - ((wx / 2) + 10);
  var nheight = (window.screen.height / 2) - ((wy / 2) + 50);
  popupwin = window.open(url, name, "location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=1,resizable=yes,height=" + wy + ",width=" + wx + ",left=" + nwidth + ",top=" + nheight + ",screenX=" + nwidth + ",screenY=" + nheight);
  popupwin.focus();
}

function donewpopup(wx, wy, url, name) {
  var nwidth = (window.screen.width / 2) - ((wx / 2) + 10);
  var nheight = (window.screen.height / 2) - ((wy / 2) + 50);
  popupwin = window.open( url,name,"toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=1,resizable=yes,height=" + wy + ",width=" + wx + ",left=" + nwidth + ",top=" + nheight + ",screenX=" + nwidth + ",screenY=" + nheight )
  popupwin.focus();
}
