<!-- Major props to Cabel Sasser of Panic.com for the JavaScript -->

var isNav4, isIE4, isMac, isNav6;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
  isNav4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) != 5) ? true : false
  isNav6 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 5) ? true : false
  isIE4  = (navigator.appName.indexOf("Microsoft") != -1) ? true : false
  isMac  = (navigator.platform.indexOf("Mac") != -1) ? true : false
}

function winPop(url, winWidth, winHeight, noBlack) {
  if (isNav4 || isIE4) {
    var screenPosX,screenPosY;
    screenPosX = (screen.availWidth - winWidth) / 2;
    screenPosY = (screen.availHeight - winHeight) / 2;
    if (isNav4) {
      window.open(url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width='+winWidth+',height='+winHeight+',screenX='+screenPosX+',screenY='+screenPosY);
    }
    if (isIE4) {
      newwin = window.open(url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width='+winWidth+',height='+winHeight+',left='+screenPosX+',top='+screenPosY);    
      if (noBlack != "1") {
        newwin.document.body.style.backgroundColor = "#000000"; 
      }
    }
  }
  else {
    window.open(url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width='+winWidth+',height='+winHeight);
  } 
}
