  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: ';
    var theend = 'index.htm';                   // last item to be listed
    var begin  = '~lapinskas';                       // first item to be listed
    var now    = (begin != '') ? 0 : 1;        // 0 if begin set
    var sl     = '/';
    var home   = '~lapinskas';
    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++;
        }
    }

/* 
when here
        aURLen contains number of path items
        aURL[x] contains item names
        aURLoc[x] contains item paths
*/        

  if (aURL[0] == "index.htm") 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">www.populous3.info<\/a>' + ' &gt; ';
              } else {
              if (word != 'http:') {
              word = word.substring(0,1).toUpperCase() + word.substring(1,99).toLowerCase();
                output = output + '<a href="' + loc + '\/index.htm" CLASS="bread">' + word + '<\/a>' + ' &gt; ';
        }
          }
      }
  }

var regexp = /_/g
var output2 = output.replace(regexp, " ")
if (output2 == '<DIV class="navbreadcrumbs"> Location: '){
  document.write(output2 + 'Home page.<\/div>');
  } else {
  document.write(output2 + 'Here.<\/div>');
  }
}
