//* Build breadcrumb path on page for navigation
//* Copyright 2004, Copperfield Publishing; http://www.copperfieldpub.com

function Crumb(Path, Name, Url) {
	this.Path	= Path;
	this.Name	= Name;
	this.Url	= Url;
}

BagOCrumbs = new Array();

// add new breadcrumb items here (directories, link text, and breadcrumb link target).  the format:

// Directory Name: the name of the CURRENT directory (folder) (no slashes)
// Link Text: what you want to display as the breadcrumb link visible text for this level
// BreadCrumb Target:  the URL to the General Information page for this directory/set of files (full path from root, or full URL)

// NOTE: If you don't have a General Info page, use your first page at that level. This is where the user will go if he clicks on the breadcrumb link with the category name.
// The website must be organized into directories by subject; this is how the .js determines the proper path. 
// You'll need one array entry for each directory of files you want to include in the breadcrumb paths. It doesn't matter how you order them in the array below.
// Remember, each directory needs that start page. Don't build an array entry for each web page, just for each directory. 



BagOCrumbs[0] = new Crumb("projects", 		"Projects",   	 "/projects/projects_default.html");
BagOCrumbs[1] = new Crumb("73_project",    "1973 911 RS",   "/projects/73_project/73_general.html");
BagOCrumbs[2] = new Crumb("Body_gallery",    "1973 Body",   "/projects/73_project/body.html");
BagOCrumbs[3] = new Crumb("pages",    "Photos",   "/projects/73_project/Body_gallery/pages/0001 IMG_1508.html");







// ... we build the path and display it

var i, x;
strConcat = " >> ";
strUrl = document.location.href;
strList = "<a href='/'>Home</a>";
strDebug = "";
aryDirs = strUrl.split("/");
for (x=0; x < aryDirs.length; x++) {
	
	for(i = 0; i < BagOCrumbs.length; i++) {
	
		if (BagOCrumbs[i].Path.toLowerCase() == aryDirs[x].toLowerCase()) {
	
                      strList += strConcat + "<a href='" + BagOCrumbs[i].Url + "'>" + BagOCrumbs[i].Name + "</a>";
			i = BagOCrumbs.length;
		}

	}

}
strList += " >> " + document.title; 
document.write(strList);


