function centerPopUp(mypage, myname, w, h) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=0,resizable=0';
  newwin = window.open(mypage, myname, winprops);
  if (newwin.opener == null) { // for Nav 2.0x 
   newwin.opener = self; // this creates and sets a new property 
  }
  if (parseInt(navigator.appVersion) >= 4) { newwin.window.focus(); }
}