
window.onload=function()
{
	nsidcLinkStyles();
}

function nsidcLinkStyles()
{
	var url = document.location.href;
	
// conditions for main site navigation

	// Data directory
	
	if(url.match(/\/data\//))
	{
		document.getElementById("dataNav").className = "mainNavActive";
	}
	
	if(url.match(/\/data\/news\.html/))
	{
		document.getElementById("newsNav").className = "trigger";
	}
	
	// Research directory
	
	if(url.match(/\/research\//))
	{
		document.getElementById("scienceNav").className = "mainNavActive";
	}
	
	// Pubs directory
	
	if(url.match(/\/pubs\//))
	{
		document.getElementById("pubsNav").className = "mainNavActive";
	}
	
	// News directory 
	
	if(url.match(/\/news\//))
	{
		document.getElementById("newsNav").className = "mainNavActive";
	}
	
	// About directory
	
	if(url.match(/\/about\//))
	{
		document.getElementById("aboutNav").className = "mainNavActive";
	}
	
// conditions for centers

	// AGDC
	
	if(url.match(/\/agdc\//))
	{
		document.getElementById("centersNav").className = "mainNavActive";
	}
	
	if(url.match(/\/agdc\/data\//))
	{
		document.getElementById("dataNav").className = "trigger";
	}
	
	// DAAC 
	
	if(url.match(/\/daac\//))
	{
		document.getElementById("centersNav").className = "mainNavActive";
	}
	
	if(url.match(/\/arcss\//))
	{
		document.getElementById("centersNav").className = "mainNavActive";
	}
	
	if(url.match(/\/fgdc\//))
	{
		document.getElementById("centersNav").className = "mainNavActive";
	}
	
	if(url.match(/\/noaa\//))
	{
		document.getElementById("centersNav").className = "mainNavActive";
	}
	
	if(url.match(/\/usadcc\//))
	{
		document.getElementById("centersNav").className = "mainNavActive";
	}
	
	if(url.match(/\/wdc\//))
	{
		document.getElementById("centersNav").className = "mainNavActive";
	}
	
	
// conditions for guide docs and anything under /data/docs/


	if(url.match(/\/data\/docs\//))
	{
		document.getElementById("dataNav").className = "mainNavActive";
		document.getElementById("centersNav").className = "trigger";
	}

	
}