<!--

/**************************************************
*  Opens a pop-up window centered in the screen    *
**************************************************/
function popWin(mypage, myname, w, h, scroll, tool) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'status=yes,height='+h+',width='+w+',top='+wint+',left='+winl+
             ',scrollbars='+scroll+',resizable=yes,toolbar='+tool;
  win = window.open(mypage, myname, winprops);
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
  
  return win;
}

/**************************************************
*  Opens a pop-up window centered in the screen    *
*  using the href value of the anchor tag          *
**************************************************/
function popHref(anchor, myname, w, h, scroll, tool) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'status=yes,height='+h+',width='+w+',top='+wint+',left='+winl+
             ',scrollbars='+scroll+',resizable=yes,toolbar='+tool;
  win = window.open(anchor.href, myname, winprops)
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
  return false;
}

/**********************************************
*  Refresh main window and close the pop-up.    *
**********************************************/
function refreshTopWin(){
  top.opener.window.location.reload();
  top.opener.window.focus();
  self.close();
}

/**************************************************************
*  Redirect main window to a link and close the pop-up          *
**************************************************************/
function topLink(strLink) {
  top.opener.window.location.href=strLink;
  top.opener.window.focus();
  self.close();
}

/**************************************************************
*  Check if current window is a popup                          *
**************************************************************/
function isPopup() {
  if (top.opener)
    return true;
  else
    return false;
}

//-->
