// Original: Eric King (http://redrival.com/eak/)
// Modifications: Ryan Martinsen (http://blog.ryanware.com/archives/2004/09/30/javascript-popup-code-modified/)

function popupWindow(url, name, w, h, x, y) {
 if (!w) w = 450;
 if (!h) h = 280;
 if (!x) x = 150;
 if (!y) y = 150;

  winprops = 'toolbar=no,location=no,' +
    'directories=no,status=no,menubar=no,scrollbars=yes,' +
    'resizable=yes,copyhistory=no,width='+w+',height='+h+',' +
    'screenX='+x+',screenY='+y+',top='+x+',left='+y
  win = window.open(url, name, winprops)
 if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}