
// This creates an e-mail address that looks and operates OK in the browser, but
// is resistant to programs that collect e-mail addresses for spammers.
var first  = "ma";
var second = "il";
var third  = "to:";
var four   = "&#64;";
var addAth = "&#119;&#101;&#98;&#109;&#97;&#115;&#116;&#101;&#114;";
//var addDat = "&#100;&#97;&#116;&#97;&#98;&#97;&#115;&#101;&#46;";
var addDat = "";
var addTwo = "&#112;&#99;&#117;&#107;&#114;&#97;&#105;&#110;&#101;&#46;&#111;&#114;&#103;";
var webmasterString = "<a href=\"" + first + second + third + addAth + "&#64;" + addDat + addTwo + "\">" + addAth + four + addDat + addTwo + "<\/a>";

// Not currently being used. Decided not to implement cookies because too many people
// logging on from public computers and may forget to log out.
var cookieWarning = "Your browser must be set to accept cookies. A \"cookie\" " +
  "(a small text file) will be placed on your computer so you won't have to log in next " +
  "time. \n\n" +
  "CAUTION: Use this feature only on your own computer.  Not in the Internet Club!"

// Determine if the browser is Internet Explorer or Gecko-based (Firefox,
// Mozilla and Netscape)
var isIE    = false;
var isGecko = false;

detectBrowser();

function detectBrowser() {
  var ua = navigator.userAgent;
  if( ua.indexOf( "MSIE" ) > -1 ) {
    isIE    = true;
    isGecko = false;
  } else if( ua.indexOf( "Gecko" ) > -1 ) {
    isIE    = false;
    isGecko = true;
  }
  // alert( "You are using " + ( isIE == true ? "Internet Explorer." : "a Gecko-based browser." ) );
}

// This looks and works like an e-mail address in the browser, but frustrates programs that scan the web looking
// for e-mail addresses to sell to spammers.
var strWebM = "<p style=\"margin-top: 10px; margin-bottom: 0px; font-size: 12px; text-align: center;\">If " +
    " you have a technical problem with this web site or a suggestion for a new feature, <br \/>" +
    " please send an e-mail to: " +
    " <script type=\"text/javascript\">document.write( webmasterString );</script>.</p>";


// Function to open a pop-up window. Used for help messages.
function openWin(URL) {
  helpWin = window.open(URL, 'thewindow','resizable=yes,toolbar=no,directories=no,location=no,scrollbars=yes,width=475,height=500');
}

// Function to open a pop-up window. Used for help messages.
function showHelp( arg ) {
  URL = "help.php";
  if( arg.length > 0 ) {
    // URL = URL + "?ref=" + arg;
    // URL = URL + "#" + arg.slice( 0, 3 ) + "?ref=" + arg;
    URL = URL + "?ref=" + arg + "#" + arg.slice( 0, 3 ) ;
  }
  helpWin = window.open(URL, 'thewindow','resizable=yes,toolbar=no,directories=no,location=no,scrollbars=yes,width=495,height=500');
}
