//This bit of JavaScript generates a common menu for all the pages relating to SRP.
//Changes to this code will be reflected all the SRP pages.

	u = document.URL;                     //URL of current document
	dirs = u.split("/");                  //Break out the parent directories
	page = dirs[dirs.length - 1];       //Last element is the document name
	if (u.substring(u.length-1, u.length) == "/")
	{
		page = "./"
	}

	numberOfLinks = 7;

	var linkName = new Array(	"Meetings",
								"Playing Schedule", 
								"Subscriptions", 
								"Map", 
								"Officers of the branch", 
								"Links",
								"Home");
	var linkUrl = new Array(	"programme0910.html",
								"schedule092.html", 
								"subs0910.html", 
								"location.html", 
								"officers.html", 
								"links.html",
								"./index.html");
	var buttonSource = new Array(	"../images/Art/oldsangb.jpg",
//								"../images/Art/old_readb.jpg", 
								"../images/Art/y_fluteb.jpg", 
								"../images/Art/soldierb.jpg", 
								"../srp/Booterstownb.jpg", 
								"../images/Art/honthorst66b.jpg", 
								"../images/Art/terbrugghenb.jpg",
								"../images/recorderrb.jpg");
	var altName = new Array(	"Programme of meetings",				// First row: "Programme of meetings"
								"Playing Schedule",						// Second row: "Playing Schedule"
								"Subscriptions",						// Third row: "Subscriptions"
								"Map",									// Fourth row: "Map"
								"Branch Officers",						// Fifth row: "Officers"
								"Links to other sites of interest",		// Sixth row: "Links"
								"Irish Branch Home Page");				// Seventh row: "Home"

// Write the HTML for a table containing the menu.

	document.write("   				<table>");


//Build HTML table from link arrays
	for (i=0; i<numberOfLinks; i++)
	{
		document.write("   					<tr>");
		document.write("   						<td>");
		if (page == linkUrl[i])
		{								//No link for current page
			document.write("   							<IMG SRC=\"" + buttonSource[i] + "\" ALT=\"" + altName[i] + "\" ALIGN=MIDDLE>");
			document.write("   						</td>");
			document.write("   						<td>");
			document.write(linkName[i] + "<BR>");
		}
		else
		{
			document.write("   							<A HREF=\"" + linkUrl[i] + "\"><IMG SRC=\"" + buttonSource[i] + "\" ALT=\"" + altName[i] + "\" ALIGN=MIDDLE></A>");
			document.write("   						</td>");
			document.write("   						<td>");
			document.write("   							<A HREF=\"" + linkUrl[i] + "\">" + linkName[i] + "</A><BR>");
		}
		document.write("   						</td>");
		document.write("   					</tr>");
	}


     document.write("   				</table>");