<!-- Script Begin
function buildPath(iterations)
{
    var constituentFolders = new Array();
    var currentURL = document.location.toString();
    currentURL=removeHTTP(currentURL);

    constituentFolders=currentURL.split("/");

    var depthStr="http://www.deeproots.org/loadpage.pl?page=";

    for (i=1;i<iterations;i++)
    {
	depthStr=depthStr + constituentFolders[i] + "/";
    }
    return depthStr;
}

function remove(s, t) {
  /*
  **  Remove all occurrences of a token in a string
  **    s  string to be processed
  **    t  token to be removed
  **  returns new string
  */
  i = s.indexOf(t);
  r = "";
  if (i == -1) return s;
  r = s.substring(0,i) + remove(s.substring(i + t.length), t);
  return r;
}

function removeHTTP(url) {
    url=remove(url,"http://www.deeproots.org/loadpage.pl?page=/");
    url=remove(url,"http://www.deeproots.org/loadpage.pl?page=");
    url=remove(url,"http://deeproots.org/loadpage.pl?page=/");
    url=remove(url,"http://deeproots.org/loadpage.pl?page=");
    url=remove(url,"http://www.deeproots.org/private/loadpage.pl?page=../");
    url=remove(url,"http://www.deeproots.org/private/loadpage.pl?page=/");
    url=remove(url,"http://www.deeproots.org/private/loadpage.pl?page=");
    url=remove(url,"http://deeproots.org/private/loadpage.pl?page=../");
    url=remove(url,"http://deeproots.org/private/loadpage.pl?page=/");
    url=remove(url,"http://deeproots.org/private/loadpage.pl?page=");
    url=remove(url,"http://www.deeproots.org/private/staff/loadpage.pl?page=../");
    url=remove(url,"http://www.deeproots.org/private/staff/loadpage.pl?page=/");
    url=remove(url,"http://www.deeproots.org/private/staff/loadpage.pl?page=");
    url=remove(url,"http://deeproots.org/private/staff/loadpage.pl?page=../");
    url=remove(url,"http://deeproots.org/private/staff/loadpage.pl?page=/");
    url=remove(url,"http://deeproots.org/private/staff/loadpage.pl?page=");
    url=remove(url,"http://www.deeproots.org/private/board/loadpage.pl?page=../");
    url=remove(url,"http://www.deeproots.org/private/board/loadpage.pl?page=/");
    url=remove(url,"http://www.deeproots.org/private/board/loadpage.pl?page=");
    url=remove(url,"http://deeproots.org/private/board/loadpage.pl?page=../");
    url=remove(url,"http://deeproots.org/private/board/loadpage.pl?page=/");
    url=remove(url,"http://deeproots.org/private/board/loadpage.pl?page=");
    url="/" + url;
    return url;
}

function insertBreadCrumbs(title)
{

    var constituentFolders = new Array();
    var currentURL = document.location.toString();


    currentURL=removeHTTP(currentURL);

    constituentFolders=currentURL.split("/");
    var outputStr="<a href=\"loadpage.pl?page=index2.htm\">Home</a>";
    var pattern = /(\w)(\w*)/; // a letter, and then one, none or more letters

    var firstsubdir=1;
    var lastsubdir=constituentFolders.length-1;

    for (count=firstsubdir;count<lastsubdir;count++)
    {
	var parts = constituentFolders[count].match(pattern);
	if (parts) {
	var firstLetter = parts[1].toUpperCase();
	var restOfWord = parts[2].toLowerCase();
	var curFolder=firstLetter + restOfWord;
	// I hate to do this but hard-code an exception for donation thank you pages (thanks_[8-digit number].htm)
	if (!((count==(lastsubdir-1)) && (currentURL.substr(currentURL.length-19,7)=="thanks_"))) {	
	if (!((count==(lastsubdir-1)) && (currentURL.substr(currentURL.length-9,currentURL.length)=="index.htm"))) {
		// another hard-coded hack--change "Field" to "From the Field"
		if (curFolder=="Field") {
			curFolder="From the Field";
		}
		if (curFolder=="Private") {
		        outputStr=outputStr + " > <span class=\"lastbreadcrumb\">" + curFolder + "</span>";
		}
		else {
		        outputStr=outputStr + " > <a href=\"" + buildPath(count+1) + "index.htm\">" + curFolder + "</a>";
		}
	}
	}
	}
    }
    if (title) {
	// change "Field" to "From the Field"
	if (title=="Field") {
		title="From the Field";
	}
/*	    outputStr=outputStr + " > " + title; */
	    outputStr=outputStr + " > <span class=\"lastbreadcrumb\">" + title + "</span>";
    }
    else {
	// change "Field" to "From the Field"
	if (curFolder=="Field") {
		curFolder="From the Field";
	}
	outputStr=outputStr + " > <span class=\"lastbreadcrumb\">" + curFolder + "</span>";
    }
    document.write(outputStr);
}
// Script End -->