// Infopages breadcrumb routine

if (parseInt(navigator.appVersion)>3) {

function breadcrumbs () {
  var sURL   = window.location.href;
  var sURLen = sURL.length;
  var aURL   = new Array();
  var aURLoc = new Array();
  var aURLen = 0;
  var letter = '';
  var word   = '';
  var output = '<DIV class="navbreadcrumbs"> Location:&nbsp;&nbsp;&nbsp;';
  var theend = 'index.html';                   // last item to be listed
  var begin  = '';                       // first item to be listed
  var now    = (begin != '') ? 0 : 1;        // 0 if begin set
  var sl     = '/';
  var home   = 'xjz';
  var last   = 0;
  var gotyear = new Array();

  for (i=0; i < sURLen; i++) {        // count from 0 to length of url
    justbeforeme = sURLen - i;        // end position of letter (counts down)
    fromme       = justbeforeme - 1;        // start position of letter
    letter       = sURL.substring(fromme,justbeforeme);

    if (letter != sl) word = letter + word;
    if (((letter == sl) || (i == sURLen-1)) && (word != '')) {
      gotyear[aURLen] = 0;
      if ((word.indexOf("Y")==4)||(word.indexOf("y")==4) ){
        word = word.substring(5,8)
        if (word.substring(0,1) == "9"){
          word = "1" + word
        }
        else{
          word = "2" + word
        }
        gotyear[aURLen] = 1
      }
      aURL[aURLen]   = word;                    // location
      if (gotyear[aURLen]==1) {
        if ((word>="1964")&&(word<="1969")) word = "1964-9";
        word = "y" + word + ".html";
      }
      if (word.indexOf(".html") == -1) word += "/index.html";
      aURLoc[aURLen] = sURL.substring(0,justbeforeme) + word;  // path
      word = '';
      aURLen++;
    }
  }

/*
  alert("hello");
  when here
        aURLen contains number of path items
        aURL[x] contains item names
        aURLoc[x] contains item paths
*/
  var regexp = /_/g
  aURL[0] = aURL[0].toLowerCase()
  if (aURL[0] == theend) last = 1;
  for (i=aURLen-2; i>last-gotyear[i]; i--) {    // count down the items, omit first and last
    word = aURL[i];
    loc  = aURLoc[i];
    if (word == theend) now = 0;
    if (word == begin) now = 1;
    if (now  == 1) {
      if (word == home) {
        output = output + '<a href="' + loc + '" CLASS="bread">Home<\/a>' + ' &gt; ';
        } else {
        if (word != 'http:') {
          if (word.substring(0,3) != 'www') {
             word = word.substring(0,1).toUpperCase() + word.substring(1,99).toLowerCase();
          }
          word = word.replace(regexp, " ")
          output = output + '<a href="' + loc + '" CLASS="bread">' + word + '<\/a>' + ' &gt; ';
        }
      }
    }
  }

  document.write(output + 'Here.<\/div>');
}

}  // close IF for navigator version