var popWin = null;
var popUrl = null;
function popDoc(sUrl,sTools,sLoc,sMenu,sDir,sStatus,sScroll,sResize,iWidth,iHeight) {
  var sToolbar = 'toolbar=' + sTools + ',location=' + sLoc + ',menubar=' + sMenu + ',directories=' + sDir + ',status=' + sStatus + ',scrollbars=' + sScroll + ',resizable=' + sResize + ',width=' + iWidth + ',height=' + iHeight;
  if ((popWin == null) || (popWin.closed)) {
    popWin = window.open(sUrl,'docwin',sToolbar);
  }
  else {
    if (sUrl != popUrl) {
      popWin.location = sUrl;
      //popWin.resizeTo(iWidth,iHeight);
    }
  }
  if (popWin.blur) { popWin.focus(); }
  popUrl = sUrl;
}

