   /* the format of this array is:
      Display Text, URL (relative to the site root), Level, Optional Display
        where Optional Display is:
           0 or missing: shows if parent does
           1: must be in the virtual path to show
		  ALWAYS use forward slashes in URLs
      */
var menuItems = new Array(
  new Array( "", "", -1 ), // pseudo-parent
  new Array("Home", "index.htm", 0),
  new Array("LibraryCheck", "librarycheck/index.htm", 0, 1),
   new Array("Library Information", "librarycheck/libraryinfo.htm", 1),
   new Array("Responsibilities", "librarycheck/librarydetails.htm", 1),
   /* new Array("Download", "librarycheck/download.htm", 1), */
  /* new Array("Language Aids", "languageaids.htm", 0), */
  new Array("JavaTutor", "javatutoroverview.htm", 0),
  new Array("Learning Games", "games.htm", 0),
   new Array("Same Game", "same.html", 1),
   new Array("CrossNumbers", "cross_numbers.htm", 1),
  new Array("Peer Tutoring", "peer.htm", 0),
  new Array("Donations", "donations.htm", 0),
  new Array("Our Mission", "mission.htm", 0),
   new Array("Internet Connections", "communitynet.htm", 1),
   new Array("Native American Projects", "naprojects.htm", 1),
   new Array("Planning your Center", "settingup.htm", 1),
  new Array("Our History", "history.htm", 0),
  new Array("Contact Us", "contact.htm", 0),
  new Array("Privacy Policy", "privacy.htm", 0));

	// set all items to not show originally
var bMenuShow = new Array();
for (iItem = 0; iItem < menuItems.length; iItem++) bMenuShow[iItem] = false;

/* returns the level of the given menu item */
function menuLevel(iItem)
{  var menuItem = menuItems[iItem];
   return menuItem[2];
}

/* returns whether the given menu item should appear if its parent does */
function menuWithParent(iItem)
{  var menuItem = menuItems[iItem];
   return menuItem[3] != 1;
}

/* returns the parent (or 0) of the given menu item */
function getMenuParent(iItem)
{  var iLevel = menuLevel(iItem--);
   while (menuLevel(iItem) != iLevel - 1) iItem--;
   return iItem;
}

/* mark this item and its direct children, unless they refuse */
function markMenuChildren(iItem)
{  var iLevel = menuLevel(iItem);
   bMenuShow[iItem] = true;
   for (iItem++; iItem < menuItems.length && menuLevel(iItem) > iLevel; iItem++)
      if (menuLevel(iItem) == iLevel + 1 && menuWithParent(iItem))
         bMenuShow[iItem] = true;
      /* else if (menuLevel(iItem) == iLevel + 2 && bShowBranch)
         bMenuShow[iItem] = true; */
}

function printstart(strTitle,strMinWidth,strAltTitleTable) {

	// get the base string to use for references
var strHost = document.location.host == "" ? "file://c:/isi/corpweb/" : "http://www.interactivesciences.org/";

document.writeln("<table border=0 cellpadding=0 cellspacing=0 width=100%>");
document.writeln("<tr><td><a name=top></a><br></td></tr>");
document.writeln("<tr>");
document.writeln(" <td width=30></td>");
document.writeln(" <td bgcolor=\"#FFCC00\" width=5><img border=0 src=\"" + strHost + "1x1.gif\" width=1 height=1></td>");
document.writeln(" <td bgcolor=\"#FFCC00\">");
if (arguments.length < 3 || strAltTitleTable == "") {
        document.writeln("  <table border=0 width=100% cellpadding=0 cellspacing=0><tr><td align=left>");
        document.writeln("   <font size=6><b>" + strTitle + "</b></font>");
        document.writeln("   </td><td valign=bottom align=right><a href=\"" + strHost + "index.htm\">Home</a>&nbsp;</td></tr></table>");
        }
else document.writeln(strAltTitleTable);
document.writeln(" </td>");
document.writeln(" <td width=1 background=\"" + strHost + "images/shadowhor.gif\"><img border=0 src=\"" + strHost + "1x1.gif\" width=1 height=1></td>");
document.writeln(" <td width=6></td>");
document.writeln("</tr>");
document.writeln("<tr>");
document.writeln(" <td width=30></td>");
document.writeln(" <td width=5 height=5 background=\"" + strHost + "images/shadowul.gif\"><img border=0 src=\"" + strHost + "1x1.gif\" width=1 height=1></td>");
document.writeln(" <td height=5 background=\"" + strHost + "images/shadowver.gif\"><img border=0 src=\"" + strHost + "1x1.gif\" width=1 height=1></td>");
document.writeln(" <td width=1 height=5 background=\"" + strHost + "images/shadowur.gif\"><img border=0 src=\"" + strHost + "1x1.gif\" width=1 height=1></td>");
document.writeln(" <td width=6 height=5></td>");
document.writeln("</tr>");
document.writeln("</table>");

document.writeln("<p>&nbsp;</p>");
document.writeln("<table border=\"0\" cellpadding=4 cellspacing=0 >");
document.writeln("  <tr>");
document.writeln("    <td width=160 valign=top>");
document.writeln("<p><img border=0 src=\"" + strHost + "1x1.gif\" width=157 height=1><img border=\"0\" src=\"" + strHost + "images/tutorblack.gif\" width=\"73\" height=\"43\"></p>");
// document.writeln("<p><font size=\"1\">a non-profit public benefit corporation</font></p>");
document.writeln("<p><b><font size=3 class=company>Interactive<br>Sciences,<br>Inc.</font></b></p><br>");

	// when you navigate to a directory without specifying a file, you get a pathname that's missing
	// the index.htm, so add that in
   // note that pathname was introduced in IE 3.02 and Navigator 2.0
var strPath = document.location.pathname;
if (strPath.match(/[\/\\]$/)) strPath += "index.htm";
window.status = strPath;

   // determine the item of the array we're on and the level 
var iCurrentItem = 1;
for (iItem = 1; iItem < menuItems.length; iItem++) {
   menuItem = menuItems[iItem];

		// be general by allowing either kind of slash in the pattern
	strPattern = "/" + menuItem[1] + "$";
	strPattern = strPattern.replace(/\//g,"[/\\\\]");

		// check to see if we have a match
   if (strPath.match(new RegExp(strPattern))) iCurrentItem = iItem;
   }

   // mark the children, siblings, (grand)parents, and (grand)uncles of this item 
for (iAncestor = iCurrentItem; ;) {
   markMenuChildren(iAncestor);
   if (!iAncestor) break;
   iAncestor = getMenuParent(iAncestor);
   }

   // display all items in the array that are at or above the current level,
   //      one level below the current item, or which indicate that they should
   //   be displayed at a higher level
document.writeln("<table border=0 cellpadding=0 cellspacing=0 width=90%>");
for (iItem = 0; iItem < menuItems.length; iItem++)
   if (bMenuShow[iItem] && iItem) {
      menuItem = menuItems[iItem];
      document.write("<tr><td><table border=0 cellpadding=0 cellspacing=0 width=100%>");
      document.write("<tr><td align=right valign=top width=" + (menuLevel(iItem)*10) + (iItem == iCurrentItem ? " bgcolor=#FFCC00" : "") + ">");
      document.write("<img border=0 src=\"" + strHost + "1x1.gif\" width=1 height=1>");
      if (menuLevel(iItem) > 0) document.write("<font class=menu><small><b>&middot;</b></small></font>");
      document.write("</td>");
      document.write("<td" + (iItem == iCurrentItem ? " bgcolor=#FFCC00" : "") + ">");
      if (menuLevel(iItem) > 0) document.write("<small>");
      document.write("<a href=\"" + strHost + menuItem[1] + "\"><font class=menu>" + 
		               (menuLevel(iItem) > 0 ? "<small><b>" : "") + menuItem[0] + 
							(menuLevel(iItem) > 0 ? "</b></small>" : "") + "</font></a>");
      document.writeln("</td></tr></table></td></tr>");
      }
document.writeln("</table>");

document.writeln("</td>");
document.writeln("<td valign=top " + (strMinWidth == "" ? "" : "width=" + strMinWidth) + ">");
}

function printend(strModifiedDate) {
document.writeln("<br>");
document.writeln("<font size=\"1\">");
document.write("Copyright © 2000-2009 Interactive Sciences, Inc. All rights reserved. - Last updated on ");
// document.write(document.fileModifiedDate); rejected because not implemented in Netscape Navigator
document.writeln(strModifiedDate + " - <a href=\"#top\">Return to top</a>");
document.writeln("</td>");
document.writeln("</tr>");
document.writeln("</table>");
}
