// JavaScript Document
/*****
Dynamic Javascript Breadcrumb Navigation by Adam DuVander
http://duvinci.com/projects/javascript/crumbs/

Released under Creative Commons License:
http://creativecommons.org/licenses/by/2.5/
*****/
var crumbsep = " > ";
var precrumb = "<span class=\"bread\">";
var postcrumb = "</span>";
var sectionsep = "/";
var rootpath = "/"; // Use "/" for root of domain.
var rootname = "Home";

var ucfirst = 1; // if set to 1, makes "directory" default to "Directory"

var objurl = new Object;
objurl['topics'] = 'All Topics';

// Grab the page's url and break it up into directory pieces
var pageurl = (new String(document.location));
var protocol = pageurl.substring(0, pageurl.indexOf("//") + 2);
pageurl = pageurl.replace(protocol, ""); // remove protocol from pageurl
var rooturl = pageurl.substring(0, pageurl.indexOf(rootpath) + rootpath.length); // find rooturl
if (rooturl.charAt(rooturl.length - 1) == "/") //remove trailing slash
{
  rooturl = rooturl.substring(0, rooturl.length - 1);
}
pageurl = pageurl.replace(rooturl, ""); // remove rooturl fro pageurl
if (pageurl.charAt(0) == '/') // remove beginning slash
{
  pageurl = pageurl.substring(1, pageurl.length);
}

var page_ar = pageurl.split(sectionsep);
var currenturl = protocol + rooturl;
var allbread = precrumb + "<a href=\"" + currenturl + "\">" + rootname + "</a>" + postcrumb; // start with root

for (i=0; i < page_ar.length-1; i++)
{
  var displayname = "";
  currenturl += "/" + page_ar[i];
  if (objurl[page_ar[i]])
  {
    displayname = objurl[page_ar[i]];
  }
  else
  {
    if (ucfirst == 1)
    {
      displayname = page_ar[i].charAt(0).toUpperCase() + page_ar[i].substring(1);
    }
    else
    {
      displayname = page_ar[i];
    }
  }
  allbread += crumbsep + precrumb + "<a href=\"" + currenturl + "\">" + displayname + "</a>" + postcrumb;
}
document.write(allbread);


function phil1() {
	newwin = window.open("/projects/customer/phil1.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=450, height=380");
	}
function phil2() {
	newwin = window.open("/projects/customer/phil2.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=410, height=310");
	}
function phil3() {
	newwin = window.open("/projects/customer/phil3.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=800, height=470");
	}
function phil4() {
	newwin = window.open("/projects/customer/phil4.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=800, height=470");
	}
function tracy() {
	newwin = window.open("/projects/customer/tracy.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=800, height=470");
	}
function dee() {
	newwin = window.open("/projects/customer/dee.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=800, height=470");
	}
function ernie1() {
	newwin = window.open("/projects/customer/ernie1.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=550, height=370");
	}
function ernie2() {
	newwin = window.open("/projects/customer/ernie2.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=560, height=315");
	}
function ernie3() {
	newwin = window.open("/projects/customer/ernie3.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=800, height=470");
	}
function sup1() {
	newwin = window.open("/projects/customer/sup1.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=450, height=300");
	}
function sup2() {
	newwin = window.open("/projects/customer/sup2.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=450, height=300");
	}
function sup3() {
	newwin = window.open("/projects/customer/sup3.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=800, height=470");
	}
function greg1() {
	newwin = window.open("/projects/customer/greg1.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=655, height=450");
	}
function greg2() {
	newwin = window.open("/projects/customer/greg2.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=650, height=490");
	}
function greg3() {
	newwin = window.open("/projects/customer/greg3.htm", "", "toolbar=no, status=no, scrollbars=no, resize=no, menubar=no, width=655, height=495");
	}