var menuItemSize = 8;
var menuItem = new Array(menuItemSize)
menuItem[0]= new Array("Home", "index");
menuItem[1]=new Array("About&nbsp;the&nbsp;PWC", "about");
menuItem[2]=new Array("Concerts", "concerts");
menuItem[3]=new Array("Recordings", "recording");
menuItem[4]=new Array("Auditions", "join");
menuItem[5]=new Array("Get&nbsp;involved", "support");
menuItem[6]=new Array("Contact the PWC", "contact");
menuItem[7]=new Array("Media", "press");


var imgMenuItemSize = 8;
var imgMenuItem = new Array(imgMenuItemSize )
imgMenuItem[0]= new Array("home", "index");
imgMenuItem[1]=new Array("about", "about");
imgMenuItem[2]=new Array("concerts", "concerts");
imgMenuItem[3]=new Array("recordings", "recording");
imgMenuItem[4]=new Array("auditions", "join");
imgMenuItem[5]=new Array("support", "support");
imgMenuItem[6]=new Array("contact", "contact");
imgMenuItem[7]=new Array("media", "press");

var imgFooterMenuItemSize = 8;
var imgFooterMenuItem= new Array(imgFooterMenuItemSize )
imgFooterMenuItem[0]= new Array("home2", "index");
imgFooterMenuItem[1]=new Array("about2", "about");
imgFooterMenuItem[2]=new Array("concerts2", "concerts");
imgFooterMenuItem[3]=new Array("recordings2", "recording");
imgFooterMenuItem[4]=new Array("auditions2", "join");
imgFooterMenuItem[5]=new Array("support2", "support");
imgFooterMenuItem[6]=new Array("contact2", "contact");
imgFooterMenuItem[7]=new Array("media2", "press");



var aboutMenuItemSize = 9;
var aboutMenuItem = new Array(aboutMenuItemSize);
aboutMenuItem[0]= new Array("About", "about");
aboutMenuItem[1]=new Array("Mission", "mission");
aboutMenuItem[2]=new Array("Musical Leadership", "leadership");
aboutMenuItem[3]=new Array("Board of Directors", "board");
aboutMenuItem[4]=new Array("Highlights", "highlights");
aboutMenuItem[5]=new Array("Repertoire", "repertoire");
aboutMenuItem[6] = new Array("Newsletters", "newsletter");
aboutMenuItem[7] = new Array("Public Documents", "publicDocuments");
aboutMenuItem[8] = new Array("PWC Mentorship Program", "mentor");

var concertMenuItemSize = 2;
var concertMenuItem = new Array(concertMenuItemSize);
concertMenuItem[0]= new Array("Concerts", "concerts");
concertMenuItem[1]= new Array("Tickets", "tickets");

var recordingMenuItemSize = 2;
var recordingMenuItem = new Array(recordingMenuItemSize);
recordingMenuItem[0]= new Array("Recordings", "recording");
recordingMenuItem[1]= new Array("Playlists", "playlist");

var supportMenuItemSize = 2;
var supportMenuItem = new Array(supportMenuItemSize);
supportMenuItem[0] = new Array("Get involved", "support");
supportMenuItem[1] = new Array("Auditions", "join");

var contactMenuItemSize = 8;
var contactMenuItem = new Array(contactMenuItemSize);
contactMenuItem[0] = new Array("Contact the PWC", "contact");
contactMenuItem[1] = new Array("FAQ", "faq");
contactMenuItem[2] = new Array("Get involved", "support");
contactMenuItem[3] = new Array("Weddings", "weddings");
contactMenuItem[4] = new Array("Auditions", "join");
contactMenuItem[5] = new Array("Join mailing list", "mailinglist");
contactMenuItem[6] = new Array("Corporate sponsors", "corporate.php");
contactMenuItem[7] = new Array("Gala donors", "galasupport");



var mediaMenuItemSize = 3;
var mediaMenuItem = new Array(mediaMenuItemSize);
mediaMenuItem[0] = new Array("Media", "press");
mediaMenuItem[1] = new Array("Press Releases", "pressrelease");
mediaMenuItem[2] = new Array("Photos", "photos");

var privateMenuItemSize = 4;
var privateMenuItem = new Array(privateMenuItemSize);
privateMenuItem[0] = new Array("Private Homepage", "index");
privateMenuItem[1] = new Array("Forms", "forms");
privateMenuItem[2] = new Array("Board Meetings", "boardmeetings");
privateMenuItem[3] = new Array("Photos", "photos");

var allMenusSize = 7;
var allMenusItem = new Array(allMenusSize);
allMenusItem[0] = new Array (aboutMenuItem, aboutMenuItemSize);
allMenusItem[1] = new Array (concertMenuItem, concertMenuItemSize);
allMenusItem[2] = new Array (recordingMenuItem, recordingMenuItemSize);
allMenusItem[3] = new Array (supportMenuItem, supportMenuItemSize);
allMenusItem[4] = new Array (contactMenuItem, contactMenuItemSize);
allMenusItem[5] = new Array (mediaMenuItem, mediaMenuItemSize);
allMenusItem[6] = new Array (privateMenuItem, privateMenuItemSize);

var fortiethMemoriesSize = 7;
var fortiethMemoriesItem = new Array(fortiethMemoriesSize);

fortiethMemoriesItem[0] = new Array("Favorite pieces", "favoritePiece");
fortiethMemoriesItem[1] = new Array("Funniest memories", "funniest");
fortiethMemoriesItem[2] = new Array("Best trips", "bestTrip");
fortiethMemoriesItem[3] = new Array("Most emotional moment", "emotionalMoment");
fortiethMemoriesItem[4] = new Array("The best skit", "bestSkit");
fortiethMemoriesItem[5] = new Array("Remember when...", "rememberWhen");
fortiethMemoriesItem[6] = new Array("Other memories", "other");



function footer()
{
	document.write("<div id=\"footer\">");
	linkFooter();
	addressFooter();
	document.write("</div>");
}


function fortiethFooter()
{
	document.write("<div id=\"footer\">");
	addressFooterWithCheese("../images/");
	document.write("</div>");

}

function addressFooter()
{
		addressFooterWithCheese("images/");
}

function addressFooterWithCheese(imageDir)
{
		document.write("<div id=\"addressFooter\">");
		document.write("<span>");
		emailImageLink("pwcEmail", "info", imageDir);
		document.write("<img src=\"");
		document.write(imageDir + "menu/address.gif\" border=\"0\">");
		document.write("</span></div>");

}

function linkFooter()
{
		document.write("<div id=\"linkFooter\">");
		headerLink(imgFooterMenuItem[0][0], imgFooterMenuItem[0][1]);
		//linkNoStyle(menuItem[0][0], menuItem[0][1]);
		var x=1;
		for (x=1; x<menuItemSize; x++)
			{
					headerLink(imgFooterMenuItem[x][0], imgFooterMenuItem[x][1]);
					//document.write(" &nbsp;&nbsp;&nbsp; ");
					//linkNoStyle(menuItem[x][0], menuItem[x][1]);
			}
		
		document.write("</div>");
}


function linkHeader(type)
{
	if(type == "other") {
		document.write("<div id=\"linkHeader\">");
	} else if (type == "main") {
		document.write("<div id=\"linkHeaderMain\">");
	}
	
	headerLink (imgMenuItem[0][0], imgMenuItem[0][1]);
	var x=1;
	for (x=1; x<menuItemSize; x++)
	{
		headerLink (imgMenuItem[x][0], imgMenuItem[x][1]);
	}
		
	document.write("</div>");
}

function move_in(img_name,img_src) {
	document[img_name].src=img_src;
	}

function move_out(img_name,img_src) {
	document[img_name].src=img_src;
	}


function headerLink(name,page)
{
	document.write("<A href = \"" + page + ".html\" OnMouseOver=\"move_in('" + name + "','images/menu/" + name + "_active.gif')\" OnMouseOut=\"move_in('" + name + "','images/menu/" + name + ".gif')\"><img src=\"images/menu/" + name + ".gif\" name = \"" + name + "\" border=\"0\"></A>");		
}

function emailImageLink(name,userid, imageDir )
{
	document.write("<A HREF=\"mailto:" + userid + "&#64;&#112;wchorus&#46;&#111;&#114;&#103;\" OnMouseOver=\"move_in('" + name + "','" + imageDir + "menu/" + name + "_active.gif')\" OnMouseOut=\"move_in('" + name + "','"+ imageDir + "menu/" + name + ".gif')\"><img src=\"" + imageDir + "menu/" + name + ".gif\" name = \"" + name + "\" border=\"0\"></A>");		
}

function linkHeader_old(type)
{
	if(type == "other") {
		document.write("<div id=\"linkHeader\">");
	} else if (type == "main") {
		document.write("<div id=\"linkHeaderMain\">");
	}
	
	headerLink (menuItem[0][0], menuItem[0][1]);
	var x=1;
	for (x=1; x<menuItemSize; x++)
	{
		document.write("&nbsp;&nbsp; ");
		headerLink_old (menuItem[x][0], menuItem[x][1]);
	}
		
	document.write("</div>");
}

function headerLink_old(name,page)
{
	document.write("<A href = \"" + page + ".html\">" + name + "</A>");		
}

function leftSubMenu(subMenuItem,subMenuItemSize)
{
		document.write("<div id=\"leftList\">");
		document.write("<UL>");
		var x=0;
		for (x=0; x<subMenuItemSize; x++)
			{
				document.write("<LI>");
				link (subMenuItem[x][0], subMenuItem[x][1]);
				document.write("</LI>");
			}
		document.write("</UL></div>");	


}

function head(title)
{
	
	document.write("<head>"); 
    document.write("<title>" +  title + "</title>");
	metaInfo();
	document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"images/pwcStyle.css\" />");
	document.write("</head>");
	
}

function subHead(title)
{
	document.write("<head>"); 
  document.write("<title>" +  title + "</title>");
	metaInfo();
	document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"../images/pwcStyle.css\" />");
	document.write("</head>");
}


function metaInfo()
{
	
	document.write("<META name=\"keywords\"content=\"Alameda, San Francisco, Cupertino, Mountain View, Menlo Park, Santa Clara, Milpitas, Fremont, Los Gatos, Los Altos, Sunnyvale, Palo Alto, Atherton, Redwood City, Santa Cruz, Portola Valley, San Jose, entertainment, Bay Area, arts, performing arts, music, wedding music, wedding entertainment, choruses, women's choruses, Peninsula Women's Chorus, Peninsula, music for women, women, women's music, booking wedding music\">");

	document.write("<META name=\"description\" content=\"The premier women's vocal ensemble of the San Francisco Bay Area\">");
	
	
}

function pageStart()
{
	pageStartWithMenu(-1);
}

function pageStartWithMenu(menuNumber)
{
	document.write("<div id=\"container\">");
	document.write("<div id=\"mainPanel\">");
	document.write("<div id=\"headerPanel\">");
	document.write("<a href=\"http://www.pwchorus.org\"><img src='images/header_other.gif' BORDER=0></a>");
linkHeader("other");
	document.write("</div>");
if (menuNumber != -1)
{		leftSubMenu(allMenusItem[menuNumber][0],allMenusItem[menuNumber][1]);
}
	document.write("<div id=\"otherpagesbin\">");
}	

function homepageStart()
{
	
	document.write("<div id=\"container\">");
	document.write("<div id=\"headerPanel\">");
	document.write("<a href=\"http://www.pwchorus.org\"><img src='images/header.gif' BORDER=0></a>");
	linkHeader("main");
	document.write("</div>");
	document.write("<div id=\"mainpagebin\">");
}

function fortiethPageStart()
{
	document.write("<div id=\"container\">");
	document.write("<div id=\"redbin\">");
	document.write("<a href=\"http://www.pwchorus.org\"><img src='../images/logo.gif' BORDER=0></a>");
	document.write("</div>");
      document.write("<div id=\"beigebin\">");
	}

function privatePlainPageStart(menuNumber)
{
	document.write("<div id=\"container\">");
	document.write("<div id=\"redbin\">");
	document.write("<a href=\"http://www.pwchorus.org\"><img src='../images/logo.gif' BORDER=0></a>");
	document.write("</div>");

	if (menuNumber != -1)
	{		
		leftSubMenu(allMenusItem[menuNumber][0],allMenusItem[menuNumber][1]);
	}
	document.write("<div id=\"otherpagesbin\">");
}

function privatePlainPageEnd()
{
	document.write("</div>");
	fortiethFooter();
	document.write("</div>");
}

function fortiethMemoriesPageStart()
{
	fortiethPageStart();
	document.write("<h3 style=\"margin-bottom: 0px;\"> Sharing memories");
	document.write("<br> <img src=\"http://pwchorus.org/images/underline.gif\" alt=\"\"></h3><br>");
 
	fortiethMenu();
}

function fortiethMenu()
{
		var x=0;
		for (x=0; x<fortiethMemoriesSize; x++)
			{
				link (fortiethMemoriesItem[x][0], fortiethMemoriesItem[x][1]);
				document.write("<br>");
			}		
}

function fortiethPageEnd()
{
	document.write("</div>");
	fortiethFooter();
	document.write("</div>");
}

function pageEnd()
{
	document.write("</div>");
	footer();
	document.write("</div>");
	document.write("</div>");
	
}

function homepageEnd()
{
	document.write("</div>");
	footer();
	document.write("</div>");
}

function link(name,page)
{
		if (endsWith(page,"php"))
		{
		document.write("<A class = \"leftListStyle\" href = \"" + page + "\">" + name + "</A>");	
		}
		else
		{
		document.write("<A class = \"leftListStyle\" href = \"" + page + ".html\">" + name + "</A>");	
		}
}

function endsWith(str, suffix) 
{
    return str.indexOf(suffix, str.length - suffix.length) !== -1;
}

function linkNoStyle(name,page)
{
		document.write("<A href = \"" + page + ".html\">" + name + "</A>");	
}

function infoEmailAddress()
{
	emailAddress("Peninsula Women's Chorus","info");	
}

function emailAddress(name, userid)
{
	document.write("<A HREF=\"mailto:" + userid + "&#64;&#112;wchorus&#46;&#111;&#114;&#103;\">" + name + "</A>");	
	
}

function placeImageRight(title, caption)
{
	placeImage("captionright", title, caption, 0);
}

function placeImageMostlyRight(title, caption, border)
{
	placeImage("captionright", title, caption, border);
}

function placeImageLeft(title, caption)
{
	placeImage("captionleft", title, caption, 0);
}

function placeImageCenter(title, caption)
{
	placeImage("pictCenter", title, caption, 0);
}

function placeImage(location, title, caption, border)
{
	document.write("<div id=\"" + location + "\"><IMG SRC=\"images/" + title + "\" ALT=\"" + caption + "\" BORDER=\"0\" HSPACE="+border+ ">");
	if (caption != "")
	{
		document.write("<br><div id='caption'><center>" + caption + "</center></div>");
	}
	document.write("</div>");

}


