// 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

  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 != '')) {
      aURL[aURLen]   = word;                    // location
      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
*/
  aURL[0] = aURL[0].toLowerCase()
  if (aURL[0] == theend) last = 1;
  for (i=aURLen-2; i>last; 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();
          }
          output = output + '<a href="' + loc + '" CLASS="bread">' + word + '<\/a>' + ' &gt; ';
        }
      }
    }
  }
  var regexp = /_/g
  output = output.replace(regexp, " ")
  document.write(output + 'Here.<\/div>');
}

}  // close IF for navigator version
