//* Build breadcrumb path on page for navigation
//* Copyright 2004, Copperfield Publishing; http://www.copperfieldpub.com
//
// add this line to pages you want to reference this:
//<SCRIPT language="JavaScript" src="../Breadcrumbs.js" type="text/javascript"></SCRIPT>
//

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

BagOCrumbs = new Array();

// add new directories here.  the format:

// Path: the name of the directory
// Name: the text you want to display onscreen
// Url:  the URL to the page for this group page or book


BagOCrumbs[0] = new Crumb("/", "", "");
BagOCrumbs[1] = new Crumb("about", "About Us", "/about/index.shtml");
BagOCrumbs[2] = new Crumb("courses", "Courses", "/courses/index.shtml");
BagOCrumbs[3] = new Crumb("people", "Staff", "/people/index.shtml");
BagOCrumbs[4] = new Crumb("research", "Research", "/research/index.shtml");
BagOCrumbs[5] = new Crumb("seminars", "What's On", "/seminars/index.shtml");
BagOCrumbs[6] = new Crumb("jobs", "Vacancies", "/jobs/index.shtml");
BagOCrumbs[7] = new Crumb("news", "News", "/news/index.shtml");
BagOCrumbs[8] = new Crumb("links", "Links", "/links/index.shtml");
BagOCrumbs[9] = new Crumb("archive", "Data Archive", "/archive/index.shtml");
BagOCrumbs[10] = new Crumb("projects", "Major Projects", "/projects/index.shtml");
BagOCrumbs[11] = new Crumb("contact", "Contact", "/contact/index.shtml");
BagOCrumbs[12] = new Crumb("phd", "Research", "/research/index.shtml");
BagOCrumbs[13] = new Crumb("publications/", "Research", "/research/publications/index.shtml");




// ... 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; 
strList = "You are here: " + strList; 
document.write(strList);



