/*****
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=\"crumb\">";
var postcrumb = "</span>";
var sectionsep = "/";
var rootpath = "/"; // Use "/" for root of domain.
var rootname = " ";

var ucfirst = 1; // if set to 1, makes "directory" default to "Directory"

var objurl = new Object;
objurl['2'] = 'Home';
objurl['ABOUTUS'] = 'About Us';
objurl['IntheNews'] = 'In the News';
objurl['IndustryPublications'] = 'Industry Publications';
objurl['EducationalResources'] = 'Educational Resource Links';
objurl['SEARCH_FUEL_CELL_LINKS'] = 'Search Fuel Cell Links';
objurl['UPCOMING_EVENTS'] = 'Upcoming Events';
objurl['FUEL_CELL_INFORMATION'] = 'Fuel Cell Information'
objurl['REGULATIONS-INITIATIVES'] = 'Regulations and Initiatives';
objurl['archives'] = 'News Archives';
objurl['Contact_Us'] = 'Contact Us';
objurl['VisitingScholars'] = 'Visiting Scholars';
objurl['Participating_Faculty'] = 'Participating Faculty';
objurl['STUDENTS'] = 'Students';
objurl['MEMBERSHIP'] = 'Membership';
objurl['publications'] = 'Publications';
objurl['ACTIVITIES'] = 'Activities';
objurl['betaDemos'] = 'Beta Testing';
objurl['education-outreach'] = 'Education and Outreach';
objurl['education'] ='Academic Program';
objurl['marketDynamics'] = 'Market Dynamics';
objurl['PROJECTS'] = 'Projects';
objurl['RESEARCH_STUDIES'] = 'Research Studies';
objurl['FAQ'] = 'Frequently Asked Questions';
objurl['FCexplained'] = 'Fuel Cells Explained';
objurl['TUTORIALS'] = 'Tutorials';
objurl ['CALIFORNIA_INSTALLATIONS'] = 'California Installations';
objurl ['EVENTSCALENDAR'] = 'Event Calendar';
objurl['Lab_Capabilities'] = 'Lab Capabilities';

objurl['INTHEWORKS'] ='Current Projects';
objurl['DTTP'] ='Distributed Technologies Testing Platform (DTTP)';
objurl['GCTP'] ='Grid Connectivity Testing Platforms (GCTP)';

objurl['Aerospace_FC_Systems'] = 'Aerospace Fuel Cell Systems';
objurl['Solid_Oxide_Fuel_Cell'] ='Solid Oxide Fuel Cell';
objurl['Proton_exchange_Membrane_Fuel_Cell'] ='Proton exchange Membrane Fuel Cell';
objurl['Auxiliary_Power_Unit'] ='Auxiliary Power Unit';
objurl['Revolutionary_Aerospace_Science-Engineering'] ='Revolutionary Aerospace Science Engineering';

objurl['Dynamic_Analyses_and_Control'] = 'Dynamic Analyes and Control';
objurl['Commercial_Office_Building_Data_and_Analyses'] ='Commercial Office Building Data/Analyses';
objurl['Fuel_Processors'] ='Fuel Processors';
objurl['Integrated_SOFC_Systems'] ='Integrated SOFC Systems';
objurl['Molten_Carbonate_Fuel_Cells'] ='Molten Carbonate Fuel Cells';
objurl['Planar_and_Tubular_Solid_Oxide_Fuel_Cells'] ='Planer/Tubular SOFC';
objurl['Proton_Exchange_Membrane_Fuel_Cell'] ='Proton Exchange Membrane Fuel Cell';
objurl['Residential_Data_and_Application'] ='Residential Data and Apps';
objurl['Hybrid_Fuel_Cell_Systems'] ='Hybrid Fuel Cell Systems';
objurl['Integrated_Reversible_FC_Systems'] ='Integrated Reversible Fuel Cell Systems';
objurl['Fuel_Cel_Wind_Turbine_Systems'] ='Fuel Cell Wind Turbine Systems';
objurl['High_Temperature_Proton_Conducting_Electrolyzer'] ='High Temp Proton Conducting Electrolyzer';
objurl['Multi-service_Regenerative_Electrolyzer_Fuel_Cell'] ='Multi-service Regenerative Electrolyzer Fuel Cell';
objurl['Residential_Fuel_Cell_Photovoltaic_Systems'] ='Residential  Fuel Cell Photovoltaic Systems';
objurl['Environmental_Impacts_of_Fuel_Cells'] = 'Environmental Impacts of Fuel Cells';
objurl['Air_Quality_Impacts_oF_DG_in_the_SoCal_Air_Basin'] = 'Air Quality Impacts of DG';
objurl['LCA_of_Various_FC_and_DG_Technologie'] = 'LCA of Various Fuel Cells and DG Technologies';
objurl['Potential_Impacts_of_DG_on_Air_Quality_in_the_San_Joaquin_Valley'] = 'Potential Impacts on Air Quality'; 

objurl['Materials_Science'] ='Materials Science';
objurl['Electrolyte_and_Full_Materials_Sets'] ='Electrolyte and Full Materials Sets';
objurl['High_Temp_Electrolyzer_Materials_Science'] ='High Temp Electrolyzer Materials Science';
objurl['Interconnect_Materials_and_Engineering'] ='Interconnect Materials and Engineering';
objurl['Materials_Interface_Design_and_Investigation'] ='Materials Interface Design and Investigation';
objurl['SOFC_Anode_Materials'] ='SOFC Anode Materials';
objurl['SOFC_Cathode_Materials'] ='SOFC Cathode Materials';

objurl['Hybrid_Fuel_Cell_Systems'] ='Hybrid Fuel Cell Systems';
objurl['Analyses_of_Hybrid_FC_Gas_Turbine_Systems'] ='Analyses of Hybrid Fuel Cell Gas Turbine Systems';
objurl['Controls_for_Hybrid_Fuel_Cell_Gas_Turbine_Systems'] ='Controls or Hybrid Fuel Cell Gas Turbine Systems';
objurl['Hybrid_Renewable_FC_Systems'] ='Hybrid Renewable Fuel Cell Systems';
objurl['World_First_Pressurized_SOFC-GT_Hybrid_System'] ='World First Pressurized SOFC-GT Hybrid System';

objurl['Steady_State_Analyses'] ='Steady State Analyses';
objurl['Advanced_Power_Systems_Analysis_Tools'] ='Advanced Power Systems Analysis Tools';
objurl['High_Temp_FC_Hydrogen_CoProduction'] ='High Temp Fuel Cell Hydrogen CoProduction';
objurl['Hybrid_Solid_Oxide_Fuel_Cell_Gas_Turbine_Systems'] ='Hybrid Solid Oxide Fuel Cell Gas Turbine Systems';
objurl['Integrated_Fuel_Cell_Systems'] ='Integrated Fuel Cell Systems';
objurl['Next_Generation_Central_Power'] ='Next Generation Central Power';


objurl['System_Components_and_Infrastructure'] ='System Components and Infrastructure';
objurl['Controls_for_Integrated_Fuel_Cell_Gas_Turbine_Systems'] ='Controls for Integrated Fuel Cell Gas Turbine Systems';
objurl['Distributed_Generation_Use_and_Control_in_Buildings'] ='Distributed Generation Use and Control in Buildings';
objurl['High_Temperature_Fuel_Cell_Hydrogen_and_Electricity_Co-Production'] ='High Temperature Fuel Cell Hydrogen and Electricity Co-Production';
objurl['Hydrogen_and_Reformate_Purity_Effects'] ='Hydrogen and Reformate Purity_Effects';
objurl['Novel_Reformer_Development_Testing_and_Analysis'] ='Novel Reformer Development Testing and Analysis';
objurl['Power_Park_Applications'] ='Power Park Applications';
objurl['RESEARCH_ARCHIVES'] ='Research Archives';

objurl['UfFC'] = 'Universities for Fuel cells';
objurl['ControlsWorkshop'] ='Controls for Fuel Cells Workshop';
objurl['PowerElectronics'] ='Power Electronics for Fuel Cells Workshop';
objurl['Aug7-8-2001Workshop'] ='Materials for Fuel Cells Workshop';
objurl['ZEVNET'] = 'ZEVNET';
objurl['MonetaryValueOfFuelCells'] = 'Monetary Value Of Fuel Cells';

// 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);

