var dList = new Array();
var nList = new Array();
// dir staging to This is a test
dList[0] = 'about';
nList[0] = 'About the Department';
dList[1] = 'faculty';
nList[1] = 'Faculty';
dList[2] = 'graduate';
nList[2] = 'Graduate Program';
dList[3] = 'undergraduate';
nList[3] = 'Undergraduate Program';
dList[4] = 'admissions';
nList[4] = 'Admissions';
dList[5] = 'fields';
nList[5] = 'Fields';
dList[6] = 'africa';
nList[6] = 'Africa';
dList[7] = 'ancient_med';
nList[7] = 'Ancient Mediterranean World';
dList[8] = 'britain';
nList[8] = 'Britain';
dList[9] = 'byzantine';
nList[9] = 'Byzantine';
dList[10] = 'caribbean';
nList[10] = 'Caribbean-Atlantic';
dList[11] = 'east_asia';
nList[11] = 'East Asia';
dList[12] = 'early_modern';
nList[12] = 'Early Modern Europe';
dList[13] = 'international';
nList[13] = 'International';
dList[14] = 'latin_america';
nList[14] = 'Latin America';
dList[15] = 'medieval';
nList[15] = 'Medieval Europe';
dList[16] = 'middle_east';
nList[16] = 'Islam/Middle East';
dList[17] = 'modern_europe';
nList[17] = 'Modern Europe';
dList[18] = 'modern_jewish';
nList[18] = 'Modern Jewish';
dList[19] = 'russia';
nList[19] = 'Russia';
dList[20] = 'science';
nList[20] = 'Science & Medicine';
dList[21] = 'south_asia';
nList[21] = 'South Asia';
dList[22] = 'united_states';
nList[22] = 'United States';
dList[23] = 'events';
nList[23] = 'Events Calendar';



function breadcrumbs(sClass, sDelimiter)
{
   if(!sDelimiter) sDelimiter = '>';
    var sURL = (location.pathname.indexOf('?') != -1) ? location.pathname.substring(0, location.pathname.indexOf('?')) : location.pathname;
        sURL = (location.pathname.charAt(0) == '/') ? location.pathname.substring(1) : location.pathname;
    var aURL = sURL.split('/');
    if(aURL)
    {
      var sOutput = '<a href="/">Home</a> ' + sDelimiter + ' ';
      var sPath = '/';
      for(var i = 0; i < aURL.length; i++)
      {
        if(aURL[i].indexOf('.shtml')!=-1)continue;
        sPath += aURL[i] + '/';
        for(var s = 0; s < dList.length; s++)if(aURL[i]==dList[s])aURL[i]=nList[s];        
        sOutput += '<a href="' + sPath + '"';
        if(sClass) sOutput += ' class="' + sClass +'"';
        sOutput += '>' + aURL[i] + '</a>';
        sOutput += ' ' + sDelimiter + ' ';
      }
      
      document.write(sOutput);
    }
}
