
window.onload=function()
{
	nsidcLinkStyles();
	gpLinkStyles(); // rename this to the product name, for example
	// add other functions to be called onload below
}

function gpLinkStyles()
{
	var url = document.location.href;

// conditions for Glacier Photo Collection nav

//  Glacier Photo Collection Overview
	
	if(url.match(/\/data\/glacier_photo\/index.html/)) // change productname to actual product name url
	{
		document.getElementById("gpOverview").className = "secondarySiteNavActive";
	}	
	
// Data (main nav)
	if(url.match(/glacier_photos/))
	{
		document.getElementById("dataNav").className = "mainNavActive";
	}	

// turns on Data in main nav and Search and Order in left nav for all GP pages in cgi-bin
	if(url.match(/cgi-bin/))
	{
		document.getElementById("dataNav").className = "mainNavActive";
		document.getElementById("gpSearch").className = "secondarySiteNavActive";
	}	
	
// Submission page
	if(url.match(/\/data\/glacier_photo\/submission.html/)) // change productname to actual product name url
	{
		document.getElementById("gpOverview").className = "secondarySiteNavActive";
	}	
	
// RMNP Reports page
	if(url.match(/\/data\/glacier_photo\/rmnp_reports.html/)) // change productname to actual product name url
	{
		document.getElementById("gpOverview").className = "secondarySiteNavActive";
	}	
	
// Muir Glacier Pair
	if(url.match(/\/data\/glacier_photo\/special_high_res_muir.html/)) // change productname to actual product name url
	{
		document.getElementById("gpOverview").className = "secondarySiteNavActive";
	}	
	
// if none of these conditions, do nothing
	
	else {}
	
}