var url = document.URL;
var rootPath = url.replace(/(\w+):\/\/teamsite(\.getty\.edu)?\/iw\/cci\/meta\/no-injection\/iw-mount\/\w+\/main\/\w+\/WORKAREA\/\w+|(\w+):\/\/teamsite(\.getty\.edu)?\/iw-mount\/\w+\/main\/\w+\/WORKAREA\/\w+|(\w+):\/\/teamsite(\.getty\.edu)?\/iw\/cci\/meta\/no-injection\/iw-mount\/\w+\/main\/\w+\/STAGING|(\w+):\/\/teamsite(\.getty\.edu)?\/iw-mount\/\w+\/main\/\w+\/STAGING|(\w+):\/\/(\w+)/, "");
var dirs = rootPath.split("/");
var gSection = "";
var gSectionPrefix = "";
var gSectionSubNavNode = "";
var gAllowLytebox = 1;

var sections = new Array("home", "visit", "museum", "research", "conservation", "foundation", "about"); //these values should reflect the actual dir. (the trust tab is really about, because that's the dir everything lives in)

if (url.indexOf("search.getty.edu") > -1 ) {
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	gAllowLytebox = 1;
	}
else if (dirs[1] == "research") { 
	gSection = dirs[1];
	gSectionSubNavNode = dirs[2];
	gSectionPrefix = "gri";
	}
else if (dirs[1] == "conservation") { 
	gSection = dirs[1];
	gSectionSubNavNode = dirs[2];
	gSectionPrefix = "gci";
	}	
else if (dirs[1] == "about") { 
	gSection = "trust";
	gSectionSubNavNode = dirs[2];
	if (gSectionSubNavNode == "trust.html") { gSectionSubNavNode = "trust"  };
	if (gSectionSubNavNode == "contact_us.html") { gSectionSubNavNode = "contact_us"  };
	gSectionPrefix = "trust";
	}
else if (dirs[1] == "news" ) { 
	gSection = "trust";
	gSectionSubNavNode = "news";
	gSectionPrefix = "trust";
	}	
else if (dirs[1] == "visit") { 
	gSection = dirs[1];
	gSectionSubNavNode = dirs[2];
	gSectionPrefix = "visit";
	}	
else if (dirs[1] == "mygetty") { 
	gSection = "museum";
	gSectionSubNavNode = "art";
	//gSectionSubNavNode = (gSectionSubNavNode == "mygetty") ?  "art" : gSectionSubNavNode;
	gSectionPrefix = "museum";
	}	
else if (dirs[1] == "art") { 
	gSection = "museum";
	gSectionSubNavNode = dirs[2];
	gSectionSubNavNode = (!gSectionSubNavNode || gSectionSubNavNode == "index.html" || gSectionSubNavNode == "gettyguide") ?  "art" : gSectionSubNavNode;
	gSectionPrefix = "museum";
	}		
else if (dirs[1] == "education") { 
	gSection = "museum";
	gSectionSubNavNode = "education";
	//if (gSectionSubNavNode == "about.html") { gSectionSubNavNode = "about"  };
	gSectionPrefix = "museum";
	}		
else if (dirs[1] == "museum") { 
	gSection = dirs[1];
	gSectionSubNavNode = dirs[2];
	if (gSectionSubNavNode == "about.html") { gSectionSubNavNode = "about"  };
	if (gSectionSubNavNode == "symposia") { gSectionSubNavNode = "research"  };
	if (gSectionSubNavNode == "conservation") { gSectionSubNavNode = "research"  };
	gSectionPrefix = "museum";
	}			
else if (dirs[1] == "foundation") { 
	gSection = dirs[1];
	gSectionSubNavNode = dirs[2];
	gSectionPrefix = "foundation";
	}	
else if (dirs[1] == "grants") { 
	gSection = "foundation";
	gSectionSubNavNode = "grants";
	gSectionPrefix = "foundation";
	}	
else if ((!dirs[1]) || (dirs[1] == "index.html")) { 
	gSection = "home";
	//gSectionSubNavNode = dirs[2];
	gSectionPrefix = "home";
	}
else if (dirs[1] == "subscribe") { 
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	}
else if (dirs[1] == "legal") { 
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	}
else if (dirs[1] == "staff") { 
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	}
else if (dirs[1] == "osip") { 
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	}
else if (dirs[1] == "podcasts") { 
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	}
else if (dirs[1] == "cgi-bin") { 
	gSectionSubNavNode = dirs[2];
	gAllowLytebox = 0;
	if (gSectionSubNavNode == "trippack") { 
		gSection = "museum";  
		gSectionSubNavNode = "education";  
		gSectionPrefix = "museum";   
		}
	}
else if (dirs[1] == "publications") { 
	gSection = dirs[1];
	gSectionSubNavNode = dirs[2];
	var idx = gSectionSubNavNode.indexOf('.html');
	if (idx > -1) {
		gSectionSubNavNode = gSectionSubNavNode.substring(0,idx);
		}
	gSectionPrefix = "publications";
	}		
else if (dirs[1] == "Search" || dirs[1] == "search" ) { 
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	}			
else { 
	gSection = "home";
	gSectionSubNavNode = "";
	gSectionPrefix = "home";
	}				
//gSectionSubNavNode = (gSectionSubNavNode == "index.html") ? "" : gSectionSubNavNode;	

	



	
 
