
/* This script and many more are available free online at The JavaScript Source :: http://javascript.internet.com
Created by: 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 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("ns", "Home", "/index.htm");
BagOCrumbs[1] = new Crumb("services", "Services", "/services/index.htm");
BagOCrumbs[2] = new Crumb("isocompliance", "ISO 27001 Compliance", "/services/isocompliance/index.htm");
BagOCrumbs[3] = new Crumb("PCI", "PCI DSS Compliance", "/services/PCI/index.htm");
BagOCrumbs[4] = new Crumb("riskmanagement", "Risk Management", "/services/riskmanagement/index.htm");
BagOCrumbs[5] = new Crumb("solutions", "Solutions", "/solutions/index.htm");
BagOCrumbs[6] = new Crumb("iss", "Information Security Solutions", "/solutions/iss/index.htm");
BagOCrumbs[7] = new Crumb("about", "About us", "/about/index.htm");
BagOCrumbs[8] = new Crumb("clients", "Our Clients", "/clients/index.htm");
BagOCrumbs[9] = new Crumb("about", "About us", "/about/index.htm");
BagOCrumbs[10] = new Crumb("iam", "Identity & Access Management", "/solutions/iss/iam/index.htm");
BagOCrumbs[11] = new Crumb("awareness", "Security Awareness", "/solutions/iss/index.htm");
BagOCrumbs[12] = new Crumb("partners_alliances", "Partners & Alliances", "/partners_alliances/index.htm");


// ... we build the path and display it

var i, x;
// the character below displays between the directories; you can change it if you like.
strConcat = " >> ";
strUrl = document.location.href;
//PUT back when going live
//strList = "<a href='/'>Home</a>"; 
strList = "";
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;
		}
}
}

// comment out the next line to eliminate the display of the document's title
// the character below displays between the directory and the document's title; you can change it if you like.

//strList += " | " + document.title;

document.write(strList);
