
/*###################################################################
# js_paths.js						Version1.5
# Copyright (c) 2001-2003 by Henning Poerschke          WebMediaConception.com
#
# This script's idea is based on code by Kevin Lynn Brown found at:
# The JavaScript Source!! http://javascript.internet.com
# 
# This program is free software; you can redistribute it and/or modify it under the terms
# of the GNU General Public License as published by the Free Software Foundation; 
# either version 2 of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along with this program;
# if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 
#####################################################################*/

/*
# ABOUT THIS SCRIPT
#
# js_paths.js takes the current document's location.href and splits it up into its
# various elements: protocol, folder hierarchy, and file name.
# It then offers choices if and how to display these elements.
#
# There's a built in naming convention that can be overridden at will for specific
# folders and/or files.
#
# Finally it puts everything back together and spits out the breadcrumb.
#
# HANDLING OF FOLDER HIERARCHY
#
# Since js_paths.js was created to work offline
# unwanted results are to be expected, like a breadcrumb that is so long that it fills half the page
# because of a gazillion folders in its path.
*/


if (window.location){	//just in case. haven't checked this out. are there any browser quirks with location.href?
var path="";		// to hold the complete breadcrumb path
//kill stupid login.php thingie
 if (window.location.href.indexOf('login.php') > 0) {
// alert(window.location.href.indexOf('login.php'))
 var href= window.location.href.substring(0,window.location.href.indexOf('login.php') + 9);
 } else {
var href=window.location.href;
 }
pref = new Array();	// for "partial href"
s=href.split("/");		// s: array that hold the folders' names
fname=new Array();	// fname: "full name" that will be displayed
parts=new Array();	// hold fname's parts[1]_parts[2]

for (i=2;i<(s.length-1);i++)
{pref[2]=s[2]+"\/";
pref[i+1]=pref[i]+s[i+1]+"/";};
i=s.length-2;
pref[i+1]=pref[i]+s[i+1];
for (i=2;i<(s.length-1);i++)
{fname[i]=s[i];

/* Here you can suppress display of folders' names
by assigning an empty fname string,
or change names to be displayed.*/

// alert(location.pathname);

if 	(s[i]=="ActualName"){fname[i]="ChosenName"}			//This is where you may rename or suppress directories
else if (s[i]=="localhost"){fname[i]=""}
else if ((s[i]=="user") &&  ((location.pathname) == "/user/myinfo.php"))
{fname[i]=""}
else if (s[i]=="user"){fname[i]="my info"}	
else if (s[i]=="tltc"){fname[i]="Home"}	
else if (s[i]=="www.uctltc.org"){fname[i]="Home"}	
else if (((location.pathname) == "/news/email/"))
{fname[i]=""}
else if (((location.pathname) == "/news/"))
{fname[i]=""}
else if (((location.pathname) == "/news/index.html"))
{fname[i]=""}
else if (((location.pathname) == "/communities/"))
{fname[i]=""}
else if (((location.pathname) == "/communities/index.html"))
{fname[i]=""}
else if (((location.pathname) == "/teaching/"))
{fname[i]=""}
else if (((location.pathname) == "/teaching/index.html"))
{fname[i]=""}
else if (((location.pathname) == "/wdw/index.php"))
{fname[i]=""}
// else if (s[i]=="resources"){fname[i]=""}
else if (s[i]=="news"){fname[i]="News"}
else if (s[i]=="index"){fname[i]=""}
else if (s[i]=="webdev.ucop.edu"){fname[i]=""}				//This makes "yourdomain.com" invisible
else if (s[i]=="http://webdev.ucop.edu"){fname[i]=""}
else if (((location.pathname) == "/news/topic/"))
{fname[i]=""}
else if (((location.pathname) == "/news/topic/index.html"))
{fname[i]=""}
else if (s[i]=="topic"){fname[i]="By Topic"}
else if (((location.pathname) == "/help/"))
{fname[i]=""}
else if (((location.pathname) == "/help/index.html"))
{fname[i]=""}
else if (((location.pathname) == "/toolbox/started/index.html"))
{fname[i]=""}
else if (((location.pathname) == "/toolbox/started/"))
{fname[i]=""}
// else if (((location.pathname) == "/toolbox/started/technology.html"))
// {fname[i]="Training + Guidance"}
else if (((location.pathname) == "/about/"))
{fname[i]=""}
else if (((location.pathname) == "/news/2005/"))
{fname[i]=""}
else if (((location.pathname) == "/news/2004/"))
{fname[i]=""}
else if (((location.pathname) == "/news/2003/"))
{fname[i]=""}
else if (((location.pathname) == "/news/2002/"))
{fname[i]=""}
else if (((location.pathname) == "/news/2001/"))
{fname[i]=""}
else if (((location.pathname) == "/about/index.html"))
{fname[i]=""}
else if (s[i]=="C\:"){fname[i]=""}			//When developing your site locally, suppress local directories
else if (s[i]=="C|"){fname[i]=""}			//this is for Communicator 4.77win
else if (s[i]=="MY%20SITES"){fname[i]=""}
else if (s[i]=="MY SITES"){fname[i]=""}		//this is for Communicator 4.77win

// Forget about the square bracket functionality. Doesn't matter anymore
else if (s[i]=="consulting"){fname[i]="[Consulting]"}	//If you have a folder/directory you want to show but not have 
else if (s[i]=="design"){fname[i]="web_design"}		//a link to it, put it in [square brackets]
// else if (s[i]=="communities"){fname[i]="[Communities]"}		        //Note: this will disable auto capitalization
else if (s[i]=="html"){fname[i]=""}
else if (s[i]=="email"){fname[i]=""}
else if (s[i]=="started"){fname[i]="Getting Started"}

/* Parse fname string and put it back togather as pnoun ('propper noun')
You can actually give a name to a folder here, consisting of more than one word.
To do so, separate the words with an underline "_". */

if (fname[i].charAt(0) !== "<")			// look at the first character. unless it's an '<'...e.g.<img>
	{
	pnoun = fname[i].charAt(0).toUpperCase();	// first character to upper case
	for (j=1;j<(fname[i].length);j++)
		{
		var k = j-1;					// k designates the character following the "_"
		if (fname[i].charAt(j) == "_")		// if there is an "_"...
			{
			pnoun+= " ";			// ...replace it with a space.
			}
		else if (fname[i].charAt(k) == "_")	// If  there is a "_" in front... 
			{
			pnoun+=fname[i].charAt(j).toUpperCase(); // ...capitalize the following character
			}
		else 
		{
			pnoun+=fname[i].charAt(j);	// Append each original character in fname onto pnoun
		}
		}
	fname[i]=pnoun;	// Replace fname with pnoun. (Optionally add ".toUpperCase()" if you want ALL upper case names.)
	}
};	//ops! Just a reminder to myself--was afraid this might get lost :-)

/* This writes the breadcrumb links.
Notice: I'm appending "index.htm" to the link here. Change this to your file type extension.*/

// All DIRECTORIES except the last will get applied here
for (i=2;i<(s.length-2);i++)
{
(fname[i] == "")?(path+=""):((fname[i].charAt(0)=="[")?(path+="<a class=\"breadcrumb\" href=\""+href.substring(0,href.indexOf(pref[i])+pref[i].length)+"index.html\">"+fname[i].substring(1,fname[i].length-1)+"</a> <SPAN class=\"breadcrumb2\">\&raquo;</SPAN> "):(path+="<a class=\"breadcrumb\" href=\""+href.substring(0,href.indexOf(pref[i])+pref[i].length)+"index.html\">"+fname[i]+"</a> <SPAN class=\"breadcrumb2\">\&raquo;</SPAN> "));
}



// deals with the last element (filename) in the breadcrumb. If there is no filename, then index is displayed
i=s.length-1;
// alert(s[i].substring(0,s[i].indexOf(".")));
if (s[i].substring(0,s[i].indexOf(".")) == "index") {
// if (s[i].substring(0,s[i].indexOf(".")) == "") {
// fullname="<SPAN class=\"breadcrumb2\">index</SPAN>";
fullname = "";
} else if (s[i].substring(0,s[i].indexOf(".")) == "record_detail") {
fullname="<SPAN class=\"breadcrumb2\">Course/Project Full Record</SPAN>";
} else {
fullname="<SPAN class=\"breadcrumb2\">"+s[i].substring(0,s[i].indexOf("."))+"</SPAN>";
}

// No longer needed function above does the same thing
// if (fullname==""){fullname="index"}

// The last directory in the breadcrumb
i=s.length-2;
t=s.length-1;
if (s[t].substring(0,s[t].indexOf(".")) != "index") {
(fname[i] == "")?(path+=""):((fullname=="index")?(path+=fname[i]+""):(path+="<a class=\"breadcrumb\" href=\""+href.substring(0,href.indexOf(pref[i])+pref[i].length)+"index.html\">"+fname[i]+"</a> <SPAN class=\"breadcrumb2\">\&raquo;</SPAN> "));
} else {
(fname[i] == "")?(path+=""):((fullname=="index")?(path+=fname[i]+""):(path+="<a class=\"breadcrumb\" href=\""+href.substring(0,href.indexOf(pref[i])+pref[i].length)+"index.html\">"+fname[i]+"</a>  "));
}

// The only aliasing that has happened at this point is directory renaming and specifying
// index if someone enters a directory and no file name


/* For any files not adhering to the naming scheme, you may specify a custom display name here: 
You can give a name to a page here, consisting of more than one word.
To do so, separate the words with an underline "_".*/
// Do something about file aliasing here.

// Won't ever happen because of the alising above
// if (fullname=="index"){fullname=""}
// else 

// Get access to the query string
var query_string = window.location.search.substring(1);
var vars_string = query_string.split("&");
var pair_string = vars_string[0].split("=");
var stringOne_string = pair_string[1];
// only do this stuff if it exists
// find number of items in vars_string
// alert(vars_string.length);
if (vars_string.length > 1) {
var pair_stringTwo = vars_string[1].split("=");
var stringTwo_string = pair_stringTwo[1];
}

// alert ('testing now:' + location.pathname.substring(0,location.pathname.lastIndexOf('/')));
if (location.pathname == "/communities/campus/berkeley.html") {fullname="<SPAN class=\"breadcrumb2\">Berkeley</SPAN>"}
 else if (location.pathname == "/communities/campus/davis.html")  {fullname="<SPAN class=\"breadcrumb2\">Davis</SPAN>"}
 else if (location.pathname == "/communities/campus/irvine.html") {fullname="<SPAN class=\"breadcrumb2\">Irvine</SPAN>"}
 else if (location.pathname == "/communities/campus/ucla.html")  {fullname="<SPAN class=\"breadcrumb2\">Los Angeles</SPAN>"}
 else if (location.pathname == "/communities/campus/riverside.html") {fullname="<SPAN class=\"breadcrumb2\">Riverside</SPAN>"}
 else if (location.pathname == "/communities/campus/ucsd.html")  {fullname="<SPAN class=\"breadcrumb2\">San Diego</SPAN>"}
 else if (location.pathname == "/communities/campus/ucsf.html")  {fullname="<SPAN class=\"breadcrumb2\">San Francisco</SPAN>"}
 else if (location.pathname == "/communities/campus/ucsb.html")  {fullname="<SPAN class=\"breadcrumb2\">Santa Barbara</SPAN>"}
 else if (location.pathname == "/communities/campus/ucsc.html")  {fullname="<SPAN class=\"breadcrumb2\">Santa Cruz</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2001/12") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/01") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/02") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/03") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/04") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/05") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/06") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/07") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/08") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/09") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/10") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/11") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2002/12") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/01") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/02") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/03") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/04") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/05") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/06") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/07") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/08") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/09") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/10") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/11") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2003/12") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/01") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/02") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/03") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/04") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/05") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/06") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/07") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/08") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/09") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/10") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/11") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2004/12") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/01") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/02") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/03") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/04") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/05") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/06") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/07") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/08") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/09") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/10") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/11") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/news/2005/12") {fullname="<SPAN class=\"breadcrumb2\">Article</SPAN>"}
// else if (location.pathname.substring(0,location.pathname.lastIndexOf('/')) == "/teaching/resources") {fullname="<SPAN class=\"breadcrumb2\">Resources</SPAN>"}
else if (fullname=="crptcnme"){fullname="some_name"}
else if (location.pathname == "/user/myinfo.php"){fullname="<SPAN class=\"breadcrumb2\">My Info</SPAN>"}
else if ((location.pathname) == "/help/contactus.php") {fullname="<SPAN class=\"breadcrumb2\">contact us</SPAN>"}
else if ((location.pathname) == "/user/editprofile.php") {fullname="<SPAN class=\"breadcrumb2\">edit profile</SPAN>"}
// Add more lines here
else if ((location.pathname) == "/teaching/index.html") {fullname="<SPAN class=\"breadcrumb2\">Teaching</SPAN>"}
else if ((location.pathname) == "/teaching/") {fullname="<SPAN class=\"breadcrumb2\">Teaching</SPAN>"}
else if ((location.pathname) == "/teaching/resources/ta.html") {fullname="<SPAN class=\"breadcrumb2\">Teaching Assistant Training</SPAN>"}
else if ((location.pathname) == "/user/coursesprojectslist.php") {fullname="<SPAN class=\"breadcrumb2\">Courses/Projects</SPAN>"}
else if ((location.pathname) == "/wdw/project.php") {fullname="<SPAN class=\"breadcrumb2\">Course/Project</SPAN>"}
else if ((location.pathname) == "/wdw/editproject.php") {fullname="<SPAN class=\"breadcrumb2\">Course/Project</SPAN>"}
else if ((location.pathname) == "/user/userslist.php") {fullname="<SPAN class=\"breadcrumb2\">Registered Users</SPAN>"}
else if ((location.pathname) == "/wdw/myinfosearch.php") {fullname="<SPAN class=\"breadcrumb2\">Search</SPAN>"}
else if ((location.pathname) == "/wdw/myinfosearch_results.php") {fullname="<SPAN class=\"breadcrumb2\">Search Results</SPAN>"}
else if ((location.pathname) == "/user/viewprofile.php") {fullname="<SPAN class=\"breadcrumb2\">Profile</SPAN>"}
else if ((location.pathname) == "/help/forgetpassword.php") {fullname="<SPAN class=\"breadcrumb2\">Password Retrieval</SPAN>"}
else if ((location.pathname) == "/help/map.html") {fullname="<SPAN class=\"breadcrumb2\">Site Map</SPAN>"}
else if ((location.pathname) == "/help/badbrowser.html") {fullname="<SPAN class=\"breadcrumb2\">Not Supported</SPAN>"}
else if ((location.pathname) == "/help/policies.html") {fullname="<SPAN class=\"breadcrumb2\">Policies</SPAN>"}
else if ((location.pathname) == "/user/forgetpassword.php") {fullname="<SPAN class=\"breadcrumb2\">Password Retrieval</SPAN>"}
else if (stringOne_string == "cps") {fullname="<SPAN class=\"breadcrumb2\">Register a Proxy Submitter</SPAN>"}
else if (stringOne_string == "regproxy") {fullname="<SPAN class=\"breadcrumb2\">Register a General User</SPAN>"}
else if ((location.pathname) == "/user/login.php") {fullname="<SPAN class=\"breadcrumb2\">Log in</SPAN>"}
else if ((location.pathname) == "/user/prelogin.php") {fullname="<SPAN class=\"breadcrumb2\">Log in</SPAN>"}
else if ((location.pathname) == "/user/logout.php") {fullname="<SPAN class=\"breadcrumb2\">Log out</SPAN>"}
else if ((location.pathname) == "/communities/") {fullname="<SPAN class=\"breadcrumb2\">Communities</SPAN>"}
else if ((location.pathname) == "/communities/index.html") {fullname="<SPAN class=\"breadcrumb2\">Communities</SPAN>"}
else if ((location.pathname) == "/help/") {fullname="<SPAN class=\"breadcrumb2\">Help</SPAN>"}
else if ((location.pathname) == "/help/index.html") {fullname="<SPAN class=\"breadcrumb2\">Help</SPAN>"}
else if ((location.pathname) == "/news/") {fullname="<SPAN class=\"breadcrumb2\">News</SPAN>"}
else if ((location.pathname) == "/news/index.html") {fullname="<SPAN class=\"breadcrumb2\">News</SPAN>"}
else if ((location.pathname) == "/news/email/index.php") {fullname="<SPAN class=\"breadcrumb2\">News by Email</SPAN>"}
else if ((location.pathname) == "/about/") {fullname="<SPAN class=\"breadcrumb2\">About</SPAN>"}
else if ((location.pathname) == "/toolbox/started/") {fullname="<SPAN class=\"breadcrumb2\">Getting Started</SPAN>"}
else if ((location.pathname) == "/toolbox/started/index.html") {fullname="<SPAN class=\"breadcrumb2\">Getting Started</SPAN>"}
else if ((location.pathname) == "/news/2005/") {fullname="<SPAN class=\"breadcrumb2\">2005</SPAN>"}
else if ((location.pathname) == "/news/2004/") {fullname="<SPAN class=\"breadcrumb2\">2004</SPAN>"}
else if ((location.pathname) == "/news/2003/") {fullname="<SPAN class=\"breadcrumb2\">2003</SPAN>"}
else if ((location.pathname) == "/news/2002/") {fullname="<SPAN class=\"breadcrumb2\">2002</SPAN>"}
else if ((location.pathname) == "/news/2001/") {fullname="<SPAN class=\"breadcrumb2\">2001</SPAN>"}
else if ((location.pathname) == "/about/index.html") {fullname="<SPAN class=\"breadcrumb2\">About</SPAN>"}
else if ((location.pathname) == "/help/about.html") {fullname="<SPAN class=\"breadcrumb2\">People</SPAN>"}
else if ((location.pathname) == "/about/staff.html") {fullname="<SPAN class=\"breadcrumb2\">Staff & Contacts</SPAN>"}
else if ((location.pathname) == "/funding/review.html") {fullname="<SPAN class=\"breadcrumb2\">Grants Review Committee</SPAN>"}
else if ((location.pathname) == "/help/editsubscription.php") {fullname="<SPAN class=\"breadcrumb2\">Edit Subscription</SPAN>"}
else if ((location.pathname) == "/news/email/html/012002a.html") {fullname="<SPAN class=\"breadcrumb2\">January 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/012003a.html") {fullname="<SPAN class=\"breadcrumb2\">February 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/012004a.html") {fullname="<SPAN class=\"breadcrumb2\">January 2004</SPAN>"}
else if ((location.pathname) == "/news/email/html/022002a.html") {fullname="<SPAN class=\"breadcrumb2\">February 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/022003a.html") {fullname="<SPAN class=\"breadcrumb2\">February 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/022004a.html") {fullname="<SPAN class=\"breadcrumb2\">February 2004</SPAN>"}
else if ((location.pathname) == "/news/email/html/032002a.html") {fullname="<SPAN class=\"breadcrumb2\">March 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/032003a.html") {fullname="<SPAN class=\"breadcrumb2\">March 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/032004a.html") {fullname="<SPAN class=\"breadcrumb2\">March 2004</SPAN>"}
else if ((location.pathname) == "/news/email/html/042002a.html") {fullname="<SPAN class=\"breadcrumb2\">April 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/042003a.html") {fullname="<SPAN class=\"breadcrumb2\">April 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/042004a.html") {fullname="<SPAN class=\"breadcrumb2\">April 2004</SPAN>"}
else if ((location.pathname) == "/news/email/html/052002a.html") {fullname="<SPAN class=\"breadcrumb2\">May 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/052003a.html") {fullname="<SPAN class=\"breadcrumb2\">May 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/052004a.html") {fullname="<SPAN class=\"breadcrumb2\">May 2004</SPAN>"}
else if ((location.pathname) == "/news/email/html/062002a.html") {fullname="<SPAN class=\"breadcrumb2\">June 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/062003a.html") {fullname="<SPAN class=\"breadcrumb2\">June 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/092002a.html") {fullname="<SPAN class=\"breadcrumb2\">September 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/092003a.html") {fullname="<SPAN class=\"breadcrumb2\">September 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/092004a.html") {fullname="<SPAN class=\"breadcrumb2\">September 2004</SPAN>"}
else if ((location.pathname) == "/news/email/html/102002a.html") {fullname="<SPAN class=\"breadcrumb2\">October 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/102003a.html") {fullname="<SPAN class=\"breadcrumb2\">October 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/11032003a.html") {fullname="<SPAN class=\"breadcrumb2\">October 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/112002a.html") {fullname="<SPAN class=\"breadcrumb2\">November 2002</SPAN>"}
else if ((location.pathname) == "/news/email/html/112003a.html") {fullname="<SPAN class=\"breadcrumb2\">November 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/112004a.html") {fullname="<SPAN class=\"breadcrumb2\">November 2004</SPAN>"}
else if ((location.pathname) == "/news/email/html/122002a.html") {fullname="<SPAN class=\"breadcrumb2\">December 2002 - January 2003</SPAN>"}
else if ((location.pathname) == "/news/email/html/122004a.html") {fullname="<SPAN class=\"breadcrumb2\">December 2004 - January 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/012005a.html") {fullname="<SPAN class=\"breadcrumb2\">January 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/022005a.html") {fullname="<SPAN class=\"breadcrumb2\">February 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/032005a.html") {fullname="<SPAN class=\"breadcrumb2\">March 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/042005a.html") {fullname="<SPAN class=\"breadcrumb2\">April 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/052005a.html") {fullname="<SPAN class=\"breadcrumb2\">May 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/062005a.html") {fullname="<SPAN class=\"breadcrumb2\">June 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/072005a.html") {fullname="<SPAN class=\"breadcrumb2\">July 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/082005a.html") {fullname="<SPAN class=\"breadcrumb2\">August 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/092005a.html") {fullname="<SPAN class=\"breadcrumb2\">September 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/102005a.html") {fullname="<SPAN class=\"breadcrumb2\">October 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/112005a.html") {fullname="<SPAN class=\"breadcrumb2\">November 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/122005a.html") {fullname="<SPAN class=\"breadcrumb2\">December 2005</SPAN>"}
else if ((location.pathname) == "/news/email/html/042006a.html") {fullname="<SPAN class=\"breadcrumb2\">April 2006</SPAN>"}
else if ((location.pathname) == "/admin/newstoolplain.php") {fullname="<SPAN class=\"breadcrumb2\">News by Email</SPAN>"}
else if ((location.pathname) == "/toolbox/started/index.html") {fullname="<SPAN class=\"breadcrumb2\">&raquo;&nbsp;Resources</SPAN>"}
else if ((location.pathname) == "/toolbox/started/") {fullname="<SPAN class=\"breadcrumb2\">Resources</SPAN>"}
else if ((location.pathname) == "/toolbox/started/glossary.html") {fullname="<SPAN class=\"breadcrumb2\">Glossary</SPAN>"}
else if ((location.pathname) == "/toolbox/collections/collections.html") {fullname="<SPAN class=\"breadcrumb2\">Repositories</SPAN>"}
else if ((location.pathname) == "/toolbox/funding/other.html") {fullname="<SPAN class=\"breadcrumb2\">Opportunities</SPAN>"}
else if ((location.pathname) == "/toolbox/funding/proposals.html") {fullname="<SPAN class=\"breadcrumb2\">TLtC Projects</SPAN>"}
else if ((location.pathname) == "/communities/discipline/biological.html") {fullname="<SPAN class=\"breadcrumb2\">Bio + Nat Sciences</SPAN>"}
else if ((location.pathname) == "/communities/discipline/social.html") {fullname="<SPAN class=\"breadcrumb2\">Social Sciences</SPAN>"}
else if ((location.pathname) == "/communities/discipline/engineering.html") {fullname="<SPAN class=\"breadcrumb2\">Comp Sci. + Engineering</SPAN>"}
else if ((location.pathname) == "/communities/discipline/physical.html") {fullname="<SPAN class=\"breadcrumb2\">Phys + Math Sciences</SPAN>"}
else if ((location.pathname) == "/communities/topic/large.html") {fullname="<SPAN class=\"breadcrumb2\">Large Enrollment</SPAN>"}
else if ((location.pathname) == "/communities/topic/library.html") {fullname="<SPAN class=\"breadcrumb2\">Libraries + Info Lit</SPAN>"}
else if ((location.pathname) == "/wdw/index.php") {fullname="<SPAN class=\"breadcrumb2\">WDW</SPAN>"}
else if ((location.pathname) == "/help/unsupportedbrowser.html") {fullname="<SPAN class=\"breadcrumb2\">Unsupported Browser</SPAN>"}
else if ((location.pathname) == "/admin/xmlpublisher.php") {fullname="<SPAN class=\"breadcrumb2\">XML Publisher</SPAN>"}
else if ((location.pathname) == "/toolbox/started/technology.html") {fullname="<SPAN class=\"breadcrumb2\">Training + Guidance</SPAN>"}
else if ((location.pathname) == "/toolbox/started/effective.html") {fullname="<SPAN class=\"breadcrumb2\">Effective Practices</SPAN>"}
else if ((location.pathname) == "/toolbox/started/specific.html") {fullname="<SPAN class=\"breadcrumb2\">Communities + Topics</SPAN>"}
else if ((location.pathname) == "/tltc/news/addcomment.php") {fullname="<SPAN class=\"breadcrumb2\">Add a Comment</SPAN>"}
else if ((location.pathname) == "/teaching/resources/uc.html") {fullname="<SPAN class=\"breadcrumb2\">UC Centers</SPAN>"}
else if ((location.pathname) == "/news/topic/large.html") {fullname="<SPAN class=\"breadcrumb2\">Large Enrollment</SPAN>"}
else if (((location.pathname) == "/news/topic/"))
{fullname="<SPAN class=\"breadcrumb2\">By Topic</SPAN>"}
else if (((location.pathname) == "/news/topic/index.html"))
{fullname="<SPAN class=\"breadcrumb2\">By Topic</SPAN>"}
// handle the proposalpage stuff
else if ((stringOne_string == "pln") && (stringTwo_string == "2004")) {fullname="<SPAN class=\"breadcrumb2\">2004 Feasibility/Planning Grants</SPAN>"}
else if ((stringOne_string == "pln") && (stringTwo_string == "2003")) {fullname="<SPAN class=\"breadcrumb2\">2003 Feasibility/Planning Grants</SPAN>"}
else if ((stringOne_string == "impl") && (stringTwo_string == "2004")) {fullname="<SPAN class=\"breadcrumb2\">2004 Implementation Grants</SPAN>"}
else if ((stringOne_string == "impl") && (stringTwo_string == "2003")) {fullname="<SPAN class=\"breadcrumb2\">2003 Implementation Grants</SPAN>"}




else {};

// alert ("Testing Only: Pathname is " + location.pathname);

pnoun = fullname.charAt(0).toUpperCase();		// first character to upper case
for (i=1;i<(fullname.length);i++)
{
var k = i-1;								// k designates the character following the "_"
if (fullname.charAt(i) == "_")					// if there is an "_"...
	{
	pnoun+= " ";						// ...replace it with a space.
	}
else if (fullname.charAt(k) == "_")				// If  there is a "_" in front...
	{
	pnoun+=fullname.charAt(i).toUpperCase();	// ...capitalize the following character
	}
else
	{
	pnoun+=fullname.charAt(i);				// Append each original character in fullname onto pnoun
	}
}
;path+=pnoun;
//url=window.location.protocol+"//"+path;	                    //use only to display protocol type (ftp://; http://)
url=path;								//If you do, comment out this line instead
document.write(url);
}
//done