//this code is called by each content page to execut certain tasks 
//automatically, or to provide common functions.

//The following variables are constants for navigation 
//buttons that are called in this page as well as the content pages.  
//They can be changed here and affect all pages

aboutItem = new Array ("About", "History", "Membership", "Reviews & Press Releases", "Press Releases")
peopleItem = new Array ("People", "Artistic Director", "Executive Director", "Accompanist",  
                   "Featured Artists", "Sponsors")
concertsItem = new Array ("Concerts", "Concert Season", "Past Concerts", "Program Notes", "Reviews", "Other Choral Groups" )
purchaseItem = new Array ("Purchase", "Tickets", "Master Singers To Go", "Recordings", "Recordings")
contactItem = new Array ("Contacts", "Contacts", "Membership")

//this code is called by navigation page to handle menus
//The first function hides all the menus

 		function hideMenu(hideElem) {	
			menuObj = document.getElementById(hideElem).style 
			menuObj.visibility = "hidden"  
		}
		
//Hide all menus, called when leaving menus and pages
		function hideAll() {	
			hideMenu('aboutMenu')
			hideMenu('peopleMenu')
			hideMenu('concertsMenu')
			hideMenu('purchaseMenu')
			hideMenu('contactMenu')
		}

//Show a specific menu, after first closing all other menus		
		function showMenu(showElem) {	
			hideAll()
			menuObj = document.getElementById(showElem).style 
			menuObj.visibility = "visible" 
		}

//This code is called to load new content into the main page frame
//		
		function setContent(thisPage) {
			parent.docFrame.document.location.href = thisPage
		}

// The following function launches a new Window called "name"
// It is used for links which are "leaving" our site.  The user can return
// to the IF site by closing this window.

	function newWin(otherLink, nameWindow) {
		otherWindow = window.open( otherLink , nameWindow, 
			"width=500,height=400,scrollbars=yes,toolbar=yes,location=yes,resizable=yes,menubar=yes")
	}
	
	// writeDate is used to put today's date in the top navigation area
	// This script and many more are available free online at -->
 // The JavaScript Source!! http://javascript.internet.com -->
	
	function writeDate() {
					d = new Array(
					"Sunday",
					"Monday",
					"Tuesday",
					"Wednesday",
					"Thursday",
					"Friday",
					"Saturday"
					);
					m = new Array(
					"January",
					"February",
					"March",
					"April",
					"May",
					"June",
					"July",
					"August",
					"September",
					"October",
					"November",
					"December"
					);
					today = new Date();
					day = today.getDate();
					year = today.getYear();
         	if (year < 2000)
					  year=year+1900;
					
					document.write(m[today.getMonth()]+" ");
					document.write(day+", "+year);
					}