d=document; l=location; path=l.pathname; p=path; //alert("search: "+ l.search);
//alert("path: "+p);
f=0; doc="";
if (l.search!=null && l.search!=undefined) {
if (l.search!=="") {
f=1;
if (l.search.indexOf("u2=")!=-1) {
	srch=unescape(l.search.split("u2=")[1]);
	doc="&nbsp;/ "+srch;
}
else
{
    if (l.search.indexOf("u=")!=-1) {
	srch=l.search.split("u=")[1].split("&")[0].split(".")[0]; //alert(srch);
	srchDirsLen=srch.split("/").length;
	srchDirs=srch.split("/");   //helps to accomodate '/'s in the searchstring
	doc="&nbsp;/ "+srchDirs[srchDirsLen-1];
    }
}
if (doc.indexOf("_")!=-1){	doc=doc.split("_").join(" "); }
if (doc.indexOf("-")!=-1){	doc=doc.split("-").join(" "); }

}

}
if (path.indexOf("moaluko")!=-1) {
//alert(path.charAt(path.length-1));  
//this part adds on the "~moaluko" portion for my webpage;
	if (path.charAt(path.length-1)=="/")
		path=path.substring(10,path.length-1);
	else
		path=path.substring(10,path.length);
	//alert(path); 
}

if (path=="/" && l.search.indexOf("wgindex")==-1) {
	d.write("<span class=doc>Home</span>");
}
else if (l.search.indexOf("wgindex")!=-1)
	d.write("<span class=doc>Search</span>");
else
{
	d.write("<a class='bcn doc' href='/?ref=bcn'>Home</a>");
	directories=path.split("/");
	ref="/";
	for (dirs=1;dirs<directories.length-1;dirs++)
	{
		//alert("ref "+ref);
		dirLabel=directories[dirs].split("_").join(" ");
		dirLabel=directories[dirs].split("-").join(" ");		

		var words = dirLabel.split( ' ' )
		for ( var i = 0; i < words.length; i++ ) {
			words[ i ] = words[ i ].substr( 0, 1 ).toUpperCase() + words[ i ].substr( 1 )
		}
		
		dirLabel = words.join(' ');
		
		ref+=directories[dirs]; //alert(ref);
		//if (dirLabel!="Page" && dirLabel!="Category") {
			d.write("&nbsp;&raquo; ");
		//}
		if (((dirs<directories.length-2 && f!=1) || (dirs<directories.length && f==1)) && (dirLabel!="Page" && dirLabel!="Category")) { 
			//if your at not at the lowest level dir with no qstring or at the lowest level dir with a qstring
			d.write("<a class='bcn' href='"+ref+"/?ref=bcn'>")
		}
				
		//if (dirLabel!="Page" && dirLabel!="Category") {
		d.write("<span class=doc>"+dirLabel+"</span>");
		//}
		//alert("directories: "+directories[dirs]);
		if (((dirs<directories.length-2 && f!=1) || (dirs<directories.length && f==1)) && (dirLabel!="Page" && dirLabel!="Category")) { 
			d.write("</a>");
		}
		ref+="/";
	}
	//d.write("<span class=doc>"+doc+"</span>");	
}
		