function pagebanner(section,subsect,level) {

var ptitle = "";
var path = "";

var navindex;
var navabout;
var navfun;
var navprograms;
var navnotes;

switch (level) {
  case 1:
    path = '../';
    break;
  case 2:
    path = '../../';
    break;
  case 3:
    path = '../../../';
    break;
}

navindex    = '<a href="' + path + 'index.html" target="_top">Home</a>';
navabout    = '<a href="' + path + 'about/about.us.html" target="_top">About Us</a>';
navfun      = '<a href="' + path + 'fun/$fun.toc.html" target="_top">Fun</a>';
navprograms = '<a href="' + path + 'programs/$programs.toc.html" target="_top">Programs</a>';
navnotes    = '<a href="' + path + 'notes/$notes.toc.html" target="_top">Notes</a>';

if (subsect == "toc") {
    switch (section) {
      case "about":
        navabout    = '<span class="nolink">About Us</span>';
        break;
      case "fun":
        navfun      = '<span class="nolink">Fun</span>';
        break;
      case "programs":
        navprograms = '<span class="nolink">Programs</span>';
        break;
      case "notes":
        navnotes    = '<span class="nolink">Notes</span>';
        break;
    }
}

if (section == "fun") {
    switch (subsect) {
      case "toc":
        ptitle = "";
        break;
      case "humor":
        ptitle = '&nbsp; &ndash;&nbsp; Humor me!';
        break;
      case "opinion":
        ptitle = '&nbsp; &ndash;&nbsp; Opinion';
        break;
      case "photo":
        ptitle = '&nbsp; &ndash;&nbsp; Photo Album';
        break;
    }
}

if (section == "notes") {
    ptitle = '&nbsp; &ndash;&nbsp; Technical Notes';
}

if (section == "profiles") {
    ptitle = '&nbsp; &ndash; &nbsp;' + subsect;
}

if ((section == "programs") && !(subsect == "toc")) {
    ptitle = '&nbsp; &ndash; &nbsp;' + subsect;
}

document.write('<table class="banner" cellspacing="0" cellpadding="0" border="0">' +
               '<tr>' +
                '<td class="btitle">' +
                 '<table cellspacing="0" cellpadding="0" border="0">' +
                 '<tr>' +
                  '<td class="slogo">' +
                   '<img src="' + path + 'stevenslogo.small.png" alt="Stevens Logo" /></td>' +
                  '<td class="header">&nbsp;Stevens Computing Services' + ptitle + '</td>' +
                 '</tr>' +
                 '</table></td>' +
               '</tr>' +
               '<tr>' +
                '<td class="navf">' +
                 '<table cellspacing="0" cellpadding="0" border="0">' +
                 '<tr>' +
                  '<td class="navindent"></td>' +
                  '<td class="nav">' + navindex    + '</td>' +
                  '<td class="nav">' + navabout    + '</td>' +
                  '<td class="nav">' + navfun      + '</td>' +
                  '<td class="nav">' + navprograms + '</td>' +
                  '<td class="nav">' + navnotes    + '</td>' +
                 '</tr>' +
                 '</table></td>' +
               '</tr>' +
               '</table>')

// Explicit spaces are needed between the links because the line breaks are not recognized.

}
