var tmSubMenu = null;
var arrMenu1 = new Array();
var arrMenu2 = new Array();
var arrMenu3 = new Array();
var arrMenu4 = new Array();
var arrMenu5 = new Array();

/************************************************************************************
DO NOT EDIT ABOVE THIS LINE
************************************************************************************/


//Sub Menu Definitions:
//----- array element 0 is button label, element 1 is link, if # is used, the link is
//----- the same as the label, with spaces replaced with underscores and all lowercase

//Menu 1
arrMenu1.push(new Array("About Us", "#"));
arrMenu1.push(new Array("Our Staff", "#"));
arrMenu1.push(new Array("Upcoming Events", "#"));
arrMenu1.push(new Array("Directions", "#"));
arrMenu1.push(new Array("Check Availability", "check_availability.php"));
arrMenu1.push(new Array("Contact Us", "#"));

//Menu 2
arrMenu2.push(new Array("Brochu Hall", "#"));
arrMenu2.push(new Array("Triganne Hall & Main Foyer ", "#"));
arrMenu2.push(new Array("Greeting Room / Grand Staircase", "greeting_room_grand_staircase.html"));
arrMenu2.push(new Array("Board Room ", "#"));
arrMenu2.push(new Array("Grounds", "#"));
arrMenu2.push(new Array("Notre Dame Church", "#"));

//Menu 3

arrMenu3.push(new Array("Amenities", "#"));
arrMenu3.push(new Array("Pricing", "#"));
arrMenu3.push(new Array("Enhancements", "#"));
arrMenu3.push(new Array("Event Policies", "#"));
arrMenu3.push(new Array("Caterers", "#"));

//Menu 4
arrMenu4.push(new Array("Guest Info", "#"));
arrMenu4.push(new Array("Invitations", "#"));
arrMenu4.push(new Array("The Cake", "#"));
arrMenu4.push(new Array("The Flowers", "#"));
arrMenu4.push(new Array("Involving Family", "#"));
arrMenu4.push(new Array("Formal Wear &amp; Gowns", "formal_wear_gowns.html"));
arrMenu4.push(new Array("The Limousine", "#"));
arrMenu4.push(new Array("Music", "#"));
arrMenu4.push(new Array("Who Pays", "#"));
arrMenu4.push(new Array("Photographer", "#"));
arrMenu4.push(new Array("Hotel", "#"));
arrMenu4.push(new Array("Videographer", "#"));

//Menu 5
arrMenu5.push(new Array("Caterers", "#"));
arrMenu5.push(new Array("Churches", "#"));
arrMenu5.push(new Array("Dining", "#"));
arrMenu5.push(new Array("Entertainment", "#"));
arrMenu5.push(new Array("Florist", "#"));
arrMenu5.push(new Array("Formal Wear", "#"));
arrMenu5.push(new Array("Justice of the Peace", "#"));
arrMenu5.push(new Array("Limousines", "#"));
arrMenu5.push(new Array("Lodging", "#"));
arrMenu5.push(new Array("Photography", "#"));
arrMenu5.push(new Array("Cakes", "#"));
arrMenu5.push(new Array("Videography", "#"));

/************************************************************************************
DO NOT EDIT BELOW THIS LINE
************************************************************************************/

function fillMenu(sMenuID, arrMenu) {
	if(document.getElementById("td_SubMenu" + sMenuID) != undefined) {
		var sHTML = "<div align=\"center\">";
		
		for(i=0; i<arrMenu.length; i++) {
			var arrLink = arrMenu[i];
			var sLink = "";
			if(arrLink[1] != "#") {
				sLink = arrLink[1];
			}
			else {
				var arrThisLink = arrLink[0].toLowerCase().split(' ');
				
				for(j=0; j<arrThisLink.length; j++) {
					if(sLink != "") {
						sLink += "_" + arrThisLink[j];
					}
					else {
						sLink = arrThisLink[j];
					}
				}
				
				sLink += ".html";
			}
			
			sHTML += "<div class=\"SubMenu_Button\"><a href=\"" + sLink + "\" class=\"SubMenu_Link\" onmouseover=\"reviveMenu()\" onmouseout=\"timeOutMenu()\">" + arrLink[0] + "</a></div>";
		}
		
		sHTML += "</div>";
		
		document.getElementById("td_SubMenu" + sMenuID).innerHTML = sHTML;
	}
}

function fillAllMenus() {
	fillMenu(1, arrMenu1);
	fillMenu(2, arrMenu2);
	fillMenu(3, arrMenu3);
	fillMenu(4, arrMenu4);
	fillMenu(5, arrMenu5);
}

function showMenu(sMenuID) {
	hideMenu();
	reviveMenu();
	if(document.getElementById("div_SubMenu" + sMenuID) != undefined && document.getElementById("hidden_OpenMenu") != undefined) {
		document.getElementById("div_SubMenu" + sMenuID).style.visibility = "visible";
		document.getElementById("div_SubMenu" + sMenuID).style.display = "block";
		document.getElementById("hidden_OpenMenu").value = sMenuID;
	}
}

function timeOutMenu() {
	tmSubMenu = setTimeout("hideMenu()", 500);
}

function hideMenu() {
	if(document.getElementById("hidden_OpenMenu") != undefined) {
		if(document.getElementById("hidden_OpenMenu").value != "-1") {
			if(document.getElementById("div_SubMenu" + document.getElementById("hidden_OpenMenu").value) != undefined) {
				document.getElementById("div_SubMenu" + document.getElementById("hidden_OpenMenu").value).style.visibility = "hidden";
				document.getElementById("div_SubMenu" + document.getElementById("hidden_OpenMenu").value).style.display = "none";
			}
			
			document.getElementById("hidden_OpenMenu").value = "-1";
		}
	}
}

function reviveMenu() {
	clearTimeout(tmSubMenu);
}