IE=(navigator.appName=="Microsoft Internet Explorer"); 
NS=(navigator.appName=="Netscape");
bVer = (IE) ? (parseFloat( navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE ")+5) )) : (parseFloat(navigator.appVersion));

aWindow = null;
function openWin(page, name, width, height) {
      var _left, _top, _params
= "width="+width+",height="+height+",resizable=yes,scrollbars=yes";

      // CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
      if (bVer >= 4) {
             _left = ( (screen.width-width) >>1 );
             _top = ( (screen.height-height) >>1 );
      } else {
             _top=60, _left=70;
      }

      if (IE) _params += ",top=" + _top + ",left=" + _left;
      else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

      aWindow = window.open(page, name, _params);
      if ( aWindow!=null && !(IE && bVer<5) )
            aWindow.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

function openWin2(page, name, width, height) {
      var _left, _top, _params
= "width="+width+",height="+height+",resizable=yes,scrollbars=no";

      // CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
      if (bVer >= 4) {
             _left = ( (screen.width-width) >>1 );
             _top = ( (screen.height-height) >>1 );
      } else {
             _top=60, _left=70;
      }

      if (IE) _params += ",top=" + _top + ",left=" + _left;
      else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

      aWindow = window.open(page, name, _params);
      if ( aWindow!=null && !(IE && bVer<5) )
            aWindow.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}
