// JavaScript Document

function openPopup(URL, name, ww, hh) {
 var xcoord, ycoord, popWidth, popHeight, popName;
 
 if(name != null) {
  popName = name;
 }
 else {
  popName = "popup";
 }
 
 if(ww != null) {
  popWidth = ww;
 }
 else {
  popWidth = 720;
 }
 
 if(hh != null) {
  popHeight = hh;
 }
 else {
  popHeight = 520;
 }
 
 if(document.getElementById) {
  xcoord = Math.round((screen.availWidth - popWidth) / 2);
  ycoord = Math.round((screen.availHeight - popHeight) / 2);
 }
 
    myPopup = window.open(URL,popName,'width=' + popWidth + ',height=' + popHeight + ',left=' + xcoord + ',top=' + ycoord + ',directories=no,menubar=yesn,status=no,resizable=1,scrollbars=yes');
    if (!myPopup.opener) {
         myPopup.opener = self;
 }
 
 myPopup.focus();
}

