SectionNames = new Array ("Home", "About GUDMAP", "Research", "Database", "Resources", "Links", "Internal", "Contact")
SectionFolders = new Array ("", "About", "Research", "Database", "Resources", "Links", "Internal", "Contact")

NumberOfSections = SectionNames.length
SectionSubMenus = new Array (NumberOfSections)
// for this array, subsections are divided by a " | ", then within each of those, subsection name and url are divided by a " * ".
SectionSubMenus[1] = ("Goal * Goal.html | Projects * Projects | Consortium * Consortium.html | Tutorial * Tutorial | News * News | Positions * Positions.html | Site Content Usage * Usage.html")
SectionSubMenus[2] = ("Molecular Anatomy of Genitourinary Development * MAGD.html | Generation of Genetically Engineered Mice * GGEM.html | Project Protocols * Protocols | Publications * Pubs")
SectionSubMenus[3] = ("")
SectionSubMenus[4] = ("Ontologies * Ontologies.html | Mouse Strains * MouseStrains")
SectionSubMenus[5] = ("Genitourinary Disease * Gen_Disease.html | Genitourinary Development * Gen_Development.html | Gene Expression * Gene_Expression.html | Funding * Funding.html | Events * Events.html")
SectionSubMenus[6] = ("Calendars * Calendars | Agendas * Agendas | Directory * Directory.html")
SectionSubMenus[7] = ("In Situ Screening * ISS.html | MicroArray Profiling * MP.html | Genetically Modified Mice * Mice.html | Database * DB.html | NIH * NIH.html")

FolderArray = window.location.pathname.split("/")
Section = FolderArray[1]
SubSection = FolderArray[2]

if (Section.indexOf(".") !== -1 || Section == "") {
SectionNum = 0
}
else {
	for (var i=1; i<NumberOfSections; i++) {
	if (Section == SectionFolders[i]) {
	SectionNum = i
	}}
	
	d.write("<p class='ineffable'><strong>&quot;" + SectionNames[SectionNum] + "&quot; submenu:</strong></p>")
	
	subSplit = SectionSubMenus[SectionNum].split(" | ")
	numSubs = subSplit.length
	d.write("<ul>")
		for (var x=0; x<numSubs; x++) {
		littleSplit = subSplit[x].split(" * ")
		d.write("<li")
		if (littleSplit[1] == SubSection) {
			d.write(" class='this'")
		}
		d.write("><a href='/" + SectionFolders[SectionNum] + "/" + littleSplit[1] + "'>" + littleSplit[0] + "</a></li>")
		}
	d.write("</ul>")
}