<!--
function makeWin(url, w, h) {
  agent = navigator.userAgent;
  windowName = "MarshPopup";
  params = "";
  params += "toolbar=0,";
  params += "location=0,";
  params += "directories=0,";
  params += "status=0,";
  params += "menubar=0,";
  params += "scrollbars=1,";
  params += "resizable=1,";
  params += "width=" + w + ",";
  params += "height=" + h;
  win = window.open(url, windowName, params);
  if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) {
     win = window.open(url, windowName, params);
  }
  if (win) {
    if (!win.opener) { win.opener = window; }
    win.focus();
  } else {
    alert('Script failed to open a pop-up window.\nPerhaps your browser settings prevent it.');
  }
}

function makeWinCenter(url, w, h) {
  agent = navigator.userAgent;
  windowName = "MarshPopupCenter";
  params  = "";
  params += "toolbar=0,";
  params += "location=0,";
  params += "directories=0,";
  params += "status=0,";
  params += "menubar=0,";
  params += "scrollbars=0,";
  params += "resizable=1,";
  params += "width=" + w + ",";
  params += "height=" + h + ",";
  params += "top=" + ((screen.height - h)/2) + ",";
  params += "left=" + ((screen.width - w)/2);
  win = window.open(url, windowName, params);
  if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) {
     win = window.open(url, windowName, params);
  }
  if (win) {
    if (!win.opener) { win.opener = window; }
    win.focus();
  } else {
    alert('Script failed to open a pop-up window.\nPerhaps your browser settings prevented it.');
  }
}

function makeWinNote(msg, w, h, sec) {
  agent = navigator.userAgent;
  windowName = "_new";
  params  = "";
  params += "toolbar=0,";
  params += "location=0,";
  params += "directories=0,";
  params += "status=0,";
  params += "menubar=0,";
  params += "scrollbars=1,";
  params += "resizable=0,";
  params += "width=" + w + ",";
  params += "height=" + h + ",";
  params += "top=" + ((screen.height - h)/2) + ",";
  params += "left=" + ((screen.width - w)/2);
  win = window.open('', windowName, params);
  if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) {
     win = window.open(url, windowName, params);
  }
  if (win) {
    if (!win.opener) { win.opener = window; }
    //start writing html to window
    win.document.open();
    win.document.writeln('<html><head><link href="/includes/style.css" type="text/css" rel="stylesheet"></head><body>');
    win.document.writeln('<table align="center" cellspacing=0 cellpadding=4 border=0 width="95%" height="95%"><tr><td align="center" valign="middle">');
    win.document.writeln(msg);
    win.document.writeln('</td></tr><tr><td align="right">');
    win.document.writeln('<form name="tic"><input name="tac" type="button" class="orangeButton" value="Close" onclick="self.close();"></form>');
    win.document.writeln('</td></tr></table>');
    if (sec != 0) {
      win.document.writeln('<script language="javascript"><!--');
      win.document.writeln('  var x=' + sec + ';');
      win.document.writeln('  function closeME() { self.document.tic.tac.value="Close ("+x+")"; x--; if (x<0) self.window.close(); self.setTimeout("closeME()", 1000); };');
      win.document.writeln('  closeME();');
      win.document.writeln('//--></script>');
    }
    win.document.writeln('</body></html>');
    win.document.close();
    win.focus();
  } else {
    alert('Script failed to open a pop-up window.\nPerhaps your browser settings prevent it.');
  }
}
//-->
