var failcount=0;

function setUpPage () {
  document.writeln('<center><p>');
    document.writeln('<form name="checkIt">');
      document.writeln('<strong>Password:</strong>');
      document.writeln('<input type="password" name="pwd" size="15"><br><br>');
      document.writeln('<input type="button" value="Check Password" onClick="submitEntry()">');
    document.writeln('</form></p></center>');
} // End of setUpPage


function submitEntry() {
  password = document.checkIt.pwd.value.toLowerCase();
  passcode = 1;

  for(i = 0; i < password.length; i++) {
    passcode *= password.charCodeAt(i);
  }
  if (passcode != 596469258000) {
    document.checkIt.pwd.value = "";
    if ((failcount += 1) == 3) history.back();
    alert("Sorry!");
	  return false;
  }

  document.writeln(
    "<html><head></head><body>" +
    "<p><a href='h/BXCSC_mailing_list.doc'>Club membership list</a>" +
    //"<p><a href='mailto:not_implemented'>Send e-mail to club membership</a>" +
    "<p><a href='bxcsctrenh-new.html'>Latest version of enhanced map</a>" +
    "<p><a href='h/operating_statement_2002-2003.doc'>2002-3 Club Operating Statement</a>" +
    "<p><a href='h/operating_statement_2003-2004.doc'>2003-4 Club Operating Statement</a>" +
    "</body></html>");
  document.close();
  return true;
} // End of submitEntry
