// JavaScript Document

/*

For simplicity, each of the 9 menu items has its own set of two functions rather than a single, hard to decipher function.
OnMouseOver, it shows a hidden div containing the menu and changes the background of the menu heading.
This is done by switching CSS styles.

The background image has a habit of flickering; this needs to be ironed out.

*/
			// About the IET menu show and hide
				function openAbout() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuAbout.className="menu";
						document.all.sectionnavabout.className="sectionnavaboutOn"
						
					} else {
						document.getElementById("menuAbout").className="menu";
						document.getElementById("sectionnavabout").className="sectionnavaboutOn"
					}
				}
				function closeAbout() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuAbout.className="menuHide"
						document.all.sectionnavabout.className="sectionnavaboutOff"
					} else {
						document.getElementById("menuAbout").className="menuHide"
						document.getElementById("sectionnavabout").className="sectionnavaboutOff"
					}
				}
			
			// Career menu show and hide
				function openCareer() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuCareer.className="menu";
						document.all.sectionnavcareer.className="sectionnavcareerOn"
					} else {
						document.getElementById("menuCareer").className="menu";
						document.getElementById("sectionnavcareer").className="sectionnavcareerOn"
					}
				}
				function closeCareer() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuCareer.className="menuHide"
						document.all.sectionnavcareer.className="sectionnavcareerOff"
					} else {
						document.getElementById("menuCareer").className="menuHide";
						document.getElementById("sectionnavcareer").className="sectionnavcareerOff"
					}
				}
				
			// Events menu show and hide
				function openEvents() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuEvents.className="menu";
						document.all.sectionnavevents.className="sectionnaveventsOn"
					} else {
						document.getElementById("menuEvents").className="menu";
						document.getElementById("sectionnavevents").className="sectionnaveventsOn"
					}
				}
				function closeEvents() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuEvents.className="menuHide"
						document.all.sectionnavevents.className="sectionnaveventsOff"
					} else {
						document.getElementById("menuEvents").className="menuHide";
						document.getElementById("sectionnavevents").className="sectionnaveventsOff"
					}
				}

			// In Your Area menu show and hide
				function openArea() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuArea.className="menu";
						document.all.sectionnavarea.className="sectionnavareaOn"
					} else {
						document.getElementById("menuArea").className="menu";
						document.getElementById("sectionnavarea").className="sectionnavareaOn"
					}
				}
				function closeArea() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuArea.className="menuHide"
						document.all.sectionnavarea.className="sectionnavareaOff"
					} else {
						document.getElementById("menuArea").className="menuHide";
						document.getElementById("sectionnavarea").className="sectionnavareaOff"
					}
				}
				
			// Membership menu show and hide
				function openMembership() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuMembership.className="menu";
						document.all.sectionnavmember.className="sectionnavmemberOn"
					} else {
						document.getElementById("menuMembership").className="menu";
						document.getElementById("sectionnavmember").className="sectionnavmemberOn"
					}
				}
				function closeMembership() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuMembership.className="menuHide"
						document.all.sectionnavmember.className="sectionnavmemberOff"
					} else {
						document.getElementById("menuMembership").className="menuHide";
						document.getElementById("sectionnavmember").className="sectionnavmemberOff"
					}
				}
				
			// Publications menu show and hide
				function openPublish() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuPublish.className="menu";
						document.all.sectionnavpublish.className="sectionnavmemberOn"
					} else {
						document.getElementById("menuPublish").className="menu";
						document.getElementById("sectionnavpublish").className="sectionnavpublishOn"
					}
				}
				function closePublish() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuPublish.className="menuHide"
						document.all.sectionnavpublish.className="sectionnavmemberOff"
					} else {
						document.getElementById("menuPublish").className="menuHide";
						document.getElementById("sectionnavpublish").className="sectionnavpublishOff"
					}
				}
				
			// Public Affairs menu show and hide
				function openPublic() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuPublic.className="menu";
						document.all.sectionnavpublic.className="sectionnavpublicOn"
					} else {
						document.getElementById("menuPublic").className="menu";
						document.getElementById("sectionnavpublic").className="sectionnavpublicOn"
					}
				}
				function closePublic() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuPublic.className="menuHide"
						document.all.sectionnavpublic.className="sectionnavpublicOff"
					} else {
						document.getElementById("menuPublic").className="menuHide";
						document.getElementById("sectionnavpublic").className="sectionnavpublicOff"
					}
				}
				
			// Schools menu show and hide
				function openSchools() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuSchools.className="menu";
						document.all.sectionnavschools.className="sectionnavschoolsOn"
					} else {
						document.getElementById("menuSchools").className="menu";
						document.getElementById("sectionnavschools").className="sectionnavschoolsOn"
					}
				}
				function closeSchools() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuSchools.className="menuHide"
						document.all.sectionnavschools.className="sectionnavschoolsOff"
					} else {
						document.getElementById("menuSchools").className="menuHide";
						document.getElementById("sectionnavschools").className="sectionnavschoolsOff"
					}
				}
				
			// Fact menu show and hide
				function openFact() {
					browser = navigator.appName ; 
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuFact.className="menu";
						document.all.sectionnavfact.className="sectionnavfactOn"
					} else {
						document.getElementById("menuFact").className="menu";
						document.getElementById("sectionnavfact").className="sectionnavfactOn"
					}
				}
				function closeFact() {
					browser = navigator.appName ;
					if (browser == "Opera") {browser = "Microsoft Internet Explorer"}
					
					if ( browser == "Microsoft Internet Explorer" ) {
						document.all.menuFact.className="menuHide"
						document.all.sectionnavfact.className="sectionnavfactOff"
					} else {
						document.getElementById("menuFact").className="menuHide";
						document.getElementById("sectionnavfact").className="sectionnavfactOff"
					}
				}

