formatHeader = function()
{
  var spacer =   "<tr><td width='127' colspan='2' height='4px'></td></tr>";

  document.write("  <table width='100%' border='0' cellpadding='0' cellspacing='0' style='height: 100%;background-image:url()'>");
  document.write("    <tr>");
  document.write("      <td width='127' height='12' bgcolor='#C1E0FE'><img src='widgets/spacer.gif' height='12' width='127' alt=''></td>");
  document.write("      <td width='100%' height='12' bgcolor='#C1E0FE'><img src='widgets/spacer.gif' height='12' width='1' alt=''></td>");
  document.write("    </tr>");
  document.write("    <tr>");
  document.write("      <td colspan='2' width='100%' height='12' bgcolor='#0099CC' valign='bottom' nowrap>&nbsp;&nbsp;<img src='widgets/gen_109.1.gif' border='0' alt=''></td>");
  document.write("    </tr>");
  document.write("    <tr>");
  document.write("      <td width='100%' height='2' colspan='2' bgcolor='#C1E0FE'><img src='widgets/spacer.gif' height='2' width='1' alt=''></td>");
  document.write("    </tr>");
  document.write("    <tr>");
  document.write("      <td width='127' height='34' bgcolor='#C1E0FE'><img src='widgets/gen_83.1.gif' border='0' width='125' height='34' alt=''></td>");
  document.write("      <td width='100%' height='34' align='right' valign='bottom' bgcolor='#003366' nowrap><img src='widgets/gen_39.1.gif' border='0' alt=''><img src='widgets/spacer.gif' height='32' width='8' alt=''></td>");
  document.write("    </tr>");
  document.write("    <tr>");
  document.write("      <td width='100%' height='2' colspan='2' bgcolor='#C1E0FE'><img src='widgets/spacer.gif' height='2' width='1' alt=''></td>");
  document.write("    </tr>");
  document.write("    <tr>");
  document.write("      <td width='100%' height='13' colspan='2' bgcolor='#0099CC'><img src='widgets/spacer.gif' height='13' width='1' alt=''></td>");
  document.write("    </tr>");
  document.write("    <tr>");
  document.write("      <td width='127' valign='top' style='height: 100%;background-image:url(widgets/gen_110.1.gif)'>");
  document.write("        <table width='127' border='0' cellpadding='0' cellspacing='0' style='height: 100%;background-image:url(widgets/gen_110.1.gif)'>");
  document.write(spacer);
  document.write(spacer);
  document.write(formatMenuItem("index.html", "Home Page"));
  document.write(spacer);
  document.write(formatMenuItem("about.html", "About/History"));
  document.write(spacer);
  document.write(formatMenuItem("baker.html", "Baker School"));
  document.write(spacer);
  document.write(formatMenuItem("annex.html", "Annex Bldg."));
  document.write(spacer);
  document.write(formatMenuItem("hours.html", "Museum Hours"));
  document.write(spacer);
  document.write(formatMenuItem("exhibits.html", "Exhibits"));
  document.write(spacer);
  document.write(formatMenuItem("thompson.html", "Thompson Hse."));
  document.write(spacer);
  document.write(formatMenuItem("genealogy.html", "Genealogy"));
  document.write(spacer);
  document.write(formatMenuItem("photos.html", "Photos"));
  document.write(spacer);
  document.write(formatMenuItem("map.html", "Map/Directions"));
  document.write(spacer);
  document.write(formatMenuItem("board.html", "Bd. Directors"));
  document.write(spacer);
  document.write(formatMenuItem("supporters.html", "Supporters"));
  document.write(spacer);
  document.write(formatMenuItem("links.html", "Internet Links"));
  document.write(spacer);
  document.write(formatMenuItem("mailto:schlarb@cebridge.net", "E-Mail"));
  document.write(spacer);
  document.write(formatMenuItem("brochure.html", "Brochure"));
  document.write(spacer);
  document.write("          <tr>");
  document.write("            <td style='height: 100%' valign='top' colspan='2'>");
  document.write("              <br>");
  document.write("              <div align='center'></div>");
  document.write("            </td>");
  document.write("          </tr>");
  document.write("        </table>");
  document.write("      </td>");
  document.write("      <td width='100%' style='height: 100%' valign='top'>");
  document.write("        <table width='100%' style='height: 100%' border='0' cellpadding='0' cellspacing='0'>");
  document.write("          <tr>");
  document.write("            <td width='100%' style='height: 100%' valign='top'>");
}

formatFooter = function()
{
  var toks = window.location.toString().split("/");
	//alert("Location"+toks[toks.length-1]);
  var pageStr = toks[toks.length-1];
  document.write("            </td>");
  document.write("          </tr>");
  document.write("          <tr>");
  document.write("            <td align='center' valign='bottom'>");
  document.write("              <div align='center' class='navigation' style='margin-top:10px;'>");
  document.write("                <font face='verdana, arial, helvetica' size='1'>");
  document.write(formatFooterItem(pageStr, "index.html", "Home Page"));
  document.write(formatFooterItem(pageStr, "about.html", "About/History"));
  document.write(formatFooterItem(pageStr, "baker.html", "Baker School"));
  document.write(formatFooterItem(pageStr, "annex.html", "Annex Bldg."));
  document.write(formatFooterItem(pageStr, "hours.html", "Museum Hours"));
  document.write(formatFooterItem(pageStr, "exhibits.html", "Exhibits"));
  document.write(formatFooterItem(pageStr, "thompson.html", "Thompson Hse."));
  document.write(formatFooterItem(pageStr, "genealogy.html", "Genealogy"));
  document.write(formatFooterItem(pageStr, "photos.html", "Photographs"));
  document.write(formatFooterItem(pageStr, "map.html", "Map/Directions"));
  document.write(formatFooterItem(pageStr, "board.html", "Bd. Directors"));
  document.write(formatFooterItem(pageStr, "supporters.html", "Supporters"));
  document.write(formatFooterItem(pageStr, "links.html", "Internet Links"));
  document.write("                </font>");
  document.write("              </div><br>");
  document.write("              <div align='center' class='copyright'>");
  document.write("                <br>");
  document.write("                <font face='helvetica,verdana, arial' size='1'>&nbsp;</font>");
  document.write("              </div><script type='text/javascript' src='widgets/noieactivate.js'>");
  document.write("              </script>");
  document.write("            </td>");
  document.write("          </tr>");
  document.write("        </table>");
  document.write("      </td>");
  document.write("    </tr>");
  document.write("  </table>");
}

formatMenuItem = function(linkStr, textStr) {
  return "<tr height='12'><td width='127' colspan='2' style='background-color:#009ACF;'><a href='"+linkStr+"' style='text-decoration : none; font-family: \"Arial\"; font-size: 10pt; font-weight: bold;'>&nbsp;&nbsp;"+textStr+"</a></td></tr>";
}

formatFooterItem = function(curPageStr, pageStr, titleStr) {
  return "<span>|"+(curPageStr == pageStr ? "" : "<a href='"+pageStr+"'>")+titleStr+(curPageStr == pageStr ? "" : "</a>")+"|</span>";
//  return "<span style='white-space: nowrap;'>|"+(curPageStr == pageStr ? "" : "<a href='"+pageStr+"'>")+titleStr+(curPageStr == pageStr ? "" : "</a>")+"|</span>";
}

