

// var i = 0;
// var MenuItems = new Array();


function MenuItem(SectionLabel, SubsectionLabel, Target, Level, ActiveSection, ActiveSubsection){
	var Prefix, Class, Item;
    
	if (Level == 1) 
	{
		Prefix = '<img src="../images/trans.gif" height="10px">';
		if (ActiveSection == SectionLabel && ActiveSubsection == "") {	Class = 'navmenu_current'; }
		else { Class= 'navmenu'; }

		Item = Prefix + '<div class="' + Class +'">' + '<a href="' + Target + '">' + SectionLabel + '</a></div>';
	}
	else
	{
		if (ActiveSection != SectionLabel)
			{ Item = ""; }
		else
		{
			Prefix = '<img src="../images/trans.gif" height="2px">';
			if (SubsectionLabel == ActiveSubsection)
			{
				Class = 'navmenu_sub_current';
			}
			else { Class= 'navmenu_sub'; }

			Item = Prefix + '<div class="' + Class +'">' + '<a href="' + Target + '">' + SubsectionLabel + '</a></div>';
		}
	}
    
	return (Item);
}


function Menu(Section, Subsection){
	var a = '<td id="vnav" vAlign="top" align="center"><br>\n';

	a = a + MenuItem("Home", "", "../main/index.shtml", 1, Section, Subsection);

	a = a + MenuItem("Richard II", "", "../main/richard.shtml", 1, Section, Subsection);
	a = a + MenuItem("Richard II", "Crew", "../richard/crew.shtml", 2, Section, Subsection);
	a = a + MenuItem("Richard II", "Cast", "../richard/cast.shtml", 2, Section, Subsection);
	//a = a + MenuItem("Richard II", "Performances", "../richard/performances.shtml", 2, Section, Subsection);	
	a = a + MenuItem("Richard II", "Venue", "../richard/venue.shtml", 2, Section, Subsection);	

	//a = a + MenuItem("Julius Caesar", "Performances", "../julius/performances.shtml", 2, Section, Subsection);
	//a = a + MenuItem("Julius Caesar", "Tickets", "../julius/tickets.shtml", 2, Section, Subsection);
	//a = a + MenuItem("Julius Caesar", "Cast", "../julius/cast.shtml", 2, Section, Subsection);
	//a = a + MenuItem("Julius Caesar", "Previous Reviews", "../julius/reviews.shtml", 2, Section, Subsection);	
  //a = a + MenuItem("Julius Caesar", "Venue", "../julius/venue.shtml", 2, Section, Subsection);
	//a = a + MenuItem("Julius Caesar", "Education", "../julius/education.shtml", 2, Section, Subsection);

	//a = a + MenuItem("News", "", "../main/news.shtml", 1, Section, Subsection);
	//a = a + MenuItem("News", "Bardathon", "../news/bardathon.shtml", 2, Section, Subsection);
	//a = a + MenuItem("News", "Autumn Production", "../news/merchant.shtml", 2, Section, Subsection);
	//a = a + MenuItem("News", "AGM", "../news/agm.shtml", 2, Section, Subsection);	
	
	a = a + MenuItem("Past Productions", "", "../main/prev_productions.shtml", 1, Section, Subsection);
	a = a + MenuItem("Past Productions", "Richard III", "../productions/richard.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Taming of the Shrew", "../productions/taming.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Comedy of Errors", "../productions/comedy.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Titus Andronicus", "../productions/titus.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Love's Labours Lost", "../productions/love.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Romeo and Juliet", "../productions/romeo.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Two Gentlemen of Verona", "../productions/verona.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "A Midsummer Night's Dream", "../productions/dream.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "King John", "../productions/john.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Henry VI", "../productions/henry.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "As You Like It", "../productions/ayli.shtml", 2, Section, Subsection);
	a = a + MenuItem("Past Productions", "Merchant of Venice", "../productions/mov.shtml", 2, Section, Subsection);	

	a = a + MenuItem("Education", "", "../main/education.shtml", 1, Section, Subsection);

	a = a + MenuItem("Membership", "", "../main/membership.shtml", 1, Section, Subsection);

	a = a + MenuItem("History", "", "../main/history.shtml", 1, Section, Subsection);
	a = a + MenuItem("History", "Origins", "../history/origins.shtml", 2, Section, Subsection);
	a = a + MenuItem("History", "Early Productions", "../history/early.shtml", 2, Section, Subsection);
	a = a + MenuItem("History", "Breakthrough", "../history/breakthrough.shtml", 2, Section, Subsection);

	a = a + MenuItem("About The Project", "", "../main/about.shtml", 1, Section, Subsection);

	a = a + '<img src="../images/trans.gif" height="8px"></td><br /><br />\n';

	return (a);
}

function MembersMenu(Section, Subsection){
	var a = '<td id="vnav" vAlign="top" align="center"><br>\n';

	a = a + MenuItem("Home", "", "../main/index.shtml", 1, Section, Subsection);
	
	a = a + MenuItem("Members", "", "../members/index.shtml", 1, Section, Subsection);
	a = a + MenuItem("Members", "Rehearsals", "../members/rehearsals.shtml", 2, Section, Subsection);
	a = a + MenuItem("Members", "Rehearsal Schedule", "../members/rehearsalsched.shtml", 2, Section, Subsection);
	
	a = a + '<img src="../images/trans.gif" height="8px"></td><br /><br />\n';

	return (a);
}

function BackstageMenu(Section, Subsection){
	var a = '<td id="vnav" vAlign="top" align="center"><br>\n';

	a = a + MenuItem("Home", "", "../main/index.shtml", 1, Section, Subsection);
	
	a = a + MenuItem("Backstage", "", "../egats/index.shtml", 1, Section, Subsection);
	
	a = a + MenuItem("Julius Caesar", "", "../egats/julius.shtml", 1, Section, Subsection);
	
	
	a = a + MenuItem("Merchant of Venice", "", "../egats/merchant.shtml", 1, Section, Subsection);
	a = a + MenuItem("Merchant of Venice", "Tickets", "../egats/mov/tickets.shtml", 2, Section, Subsection);
    	
	a = a + MenuItem("Backstage", "Auditions", "../egats/auditions.shtml", 2, Section, Subsection);
	a = a + MenuItem("Backstage", "MoV Cast", "../egats/cast.shtml", 2, Section, Subsection);
	
	a = a + '<img src="../images/trans.gif" height="8px"></td><br /><br />\n';

	return (a);
}
