/* popup           opens a new window */
function popUp(prmURL,prmHeight,prmWidth) {
  /* put it in the middle of the screen */
  scrLeft = screen.width - prmWidth;
  scrLeft = scrLeft / 2;
  scrTop = screen.height - prmHeight;
  scrTop = scrTop / 2;

  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(prmURL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=" + prmWidth + ",height=" + prmHeight + ",left =" + scrLeft + ",top = " + scrTop + "');");
  self.close;
}

/* popup pic show a picture in a new window */
function popUpPic(prmPic,prmHeight,prmWidth,prmTitle) {
  /* put it in the middle of the screen */
  scrLeft = screen.width - prmWidth;
  scrLeft = scrLeft / 2;
  scrTop = screen.height - prmHeight;
  scrTop = scrTop / 2;
  day = new Date();
  id = day.getTime();
  fullURL = "popuppic.htm?myPic=" + prmPic + "&myPicFw=" + prmWidth + "&myPicFh=" + prmHeight + "&myPicHd='" + prmTitle + "'";
  eval("page" + id + " = window.open(fullURL, 'MNFC', 'scrollbars=0,width=" + prmWidth + ",height=" + prmHeight + ",left =" + scrLeft + ",top = " + scrTop + "');");
/*  eval("page" + id + " = window.open(fullURL, '" + id + "', 'scrollbars=0,width=" + prmWidth + ",height=" + prmHeight + ",left =" + scrLeft + ",top = " + scrTop + "');");
/*  eval("page" + id + " = window.open(fullURL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=" + prmWidth + ",height=" + prmHeight + ",left =" + scrLeft + ",top = " + scrTop + "');"); */
  self.close;
}

