// AQUA Projects DHTML SubMenu JavaScript
// Designed by Jon Beer Dec 2003 / Feb 2004




/************************************************************************/
//					DON'T CHANGE THESE VARIABLE NAMES					//
/************************************************************************/
// Variables to store submenu 1 hyper link resources and link display text
var subMenu1ALINK, subMenu1BLINK;
var subMenu1AHREF, subMenu1BHREF;
// Variables to store submenu 2 hyper link resources and link display text
var subMenu2ALINK, subMenu2BLINK, subMenu2CLINK;
var subMenu2AHREF, subMenu2BHREF, subMenu2CHREF;
// Variables to store submenu 3 hyper link resources and link display text
var subMenu3ALINK, subMenu3BLINK;
var subMenu3AHREF, subMenu3BHREF;
// Variables to store submenu 4 hyper link resources and link display text
var subMenu4ALINK, subMenu4BLINK, subMenu4CLINK;
var subMenu4AHREF, subMenu4BHREF, subMenu4CHREF;
// Variables to store submenu 5 hyper link resources and link display text
var subMenu5ALINK;
var subMenu5AHREF;







/*************************************************************************/
//			AMEND THESE STRING VALUES TO CHANGE THE SUB MENU LINKS		 //
/*************************************************************************/
// Submenu 1
subMenu1ALINK = "our approach";
subMenu1AHREF = "aqua_aboutus_approach.shtml";

subMenu1BLINK = "our people";
subMenu1BHREF = "aqua_aboutus_consultants.shtml";

// Submenu 2
subMenu2ALINK = "strategic business";
subMenu2AHREF = "aqua_services_business.shtml";

subMenu2BLINK = "marketing";
subMenu2BHREF = "aqua_services_marketing.shtml";

subMenu2CLINK = "project management";
subMenu2CHREF = "aqua_services_projectmanagement.shtml";

// Submenu 3
subMenu3ALINK = "clients";
subMenu3AHREF = "aqua_projects_clients.shtml";

subMenu3BLINK = "case studies";
subMenu3BHREF = "aqua_projects_casestudies.shtml";			        

// Submenu 4
subMenu4ALINK = "white papers";
subMenu4AHREF = "aqua_library_whitepapers.shtml";

subMenu4BLINK = "conference papers";
subMenu4BHREF = "aqua_library_presentations.shtml";

subMenu4CLINK = "links";
subMenu4CHREF = "aqua_library_links.shtml";

// Submenu 5
subMenu5ALINK = "courses";
subMenu5AHREF = "aqua_training_course.shtml";					       











////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
//									DO NOT WRITE BELOW THIS SECTION 								  //
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////





/******************************************************************************************************/  
//							PLATFORM & BROWSER CONDITIONAL STYLESHEET RULES
/******************************************************************************************************/

var platform = "";
// If on windows use windows styles
if(navigator.platform.indexOf("Win") > -1) { 
  platform = "win";
  
  // use windows styles for IE 5
  if(navigator.userAgent.indexOf("MSIE 5") > -1) {
    document.write("<link rel='" + "stylesheet'"  + " href='" + "styles/IE5Aqua.css'" + " type='" + "text/css'" + "/>");
	}

  // use windows styles for IE 6
  else if(navigator.userAgent.indexOf("MSIE 6") > -1) {
    document.write("<link rel='" + "stylesheet'"  + " href='" + "styles/IE6Aqua.css'" + " type='" + "text/css'" + "/>");
	}
  
  // Use windows styles for netscape 7
  else if(navigator.userAgent.indexOf("Netscape/7") > -1) {
    document.write("<link rel='" + "stylesheet'"  + " href='" + "styles/NSAqua.css'" + " type='" + "text/css'" + "/>");
	}

  else document.write("<link rel='" + "stylesheet'"  + " href='" + "styles/IE6Aqua.css'" + " type='" + "text/css'" + "/>");
	
  // else if not windows maybe it's Mac
  } else if (navigator.platform.indexOf("Mac") > -1) {
  platform = "mac";
  
  // if mac and if IE5 use Mac IE styles
  if(navigator.userAgent.indexOf("MSIE") > -1) {
    document.write("<link rel='" + "stylesheet'"  + " href='" + "styles/MACIEAqua.css'" + " type='" + "text/css'" + "/>");
	} else document.write("<link rel='" + "stylesheet'"  + " href='" + "styles/IE6Aqua.css'" + " type='" + "text/css'" + "/>");
  } else document.write("<link rel='" + "stylesheet'"  + " href='" + "styles/IE6Aqua.css'" + " type='" + "text/css'" + "/>");
  
  
  
  
  
  
  
/******************************************************************************************************/  
//										SUB MENU FUNCTIONS
/******************************************************************************************************/    
/*
ClearSubMenu() called by mouseOver when the cursor strays away from menu.  Currently called when mouse 
goes overtable cells directly above and below menu items.  Sets the menu span element content to zero 
length string 
*/
	function clearSubMenu()
	    {
		// reset the white bar to the grey bar		
		element = document.getElementById("whiteBar");
		element.src = "images/greyBar.gif";
			
		// set the submenu span element innerHTML content to zero length string			
		element = document.getElementById("submenu");
		element.innerHTML = "";
		}

/*
SubMenu1() called by mouseOver() action on the first top level menu item.  Sets the bar image to white,
sets the horisontal location of the white bar to correspond to the above menu item and sets the submenu
span element innerHTML content to include the submenu list.  The submenu list adheres to the aqua style
submenu class 
*/
	function submenu1()
		{
		// set the white bar as bar image source		
		element = document.getElementById("whiteBar");
		element.src = "images/whiteBar.gif";

		// set the white bar left margin
		if(platform = "win") {
			element = document.getElementById("whiteBarLeft");
			element.width = "12%";
			} else { 
					element = document.all.whiteBarLeft;
					element.width = "20px";
					}
		
		// set the white bar right margin
		if(platform = "win") {
			element = document.getElementById("whiteBarRight");
			element.width = "88%";
			} else { 
					element = document.all.whiteBarRight;
					element.width = "200px";
					}
			
		// set the submenu left margin
		if(platform = "win") {
			element = document.getElementById("submenuLeft");
			} else element = document.all.submenuLeft;
			
		element.width = "11%";
		
		// fill the submenu span element with the submenu list
		element = document.getElementById("submenu");
		element.innerHTML = "<ul class='submenu'>" +
								"<li class='first'><a href='" + subMenu1AHREF + "'>" + subMenu1ALINK + "</a></li>" +
								"&nbsp;&nbsp;<span style='color:#FFFFFF; font-size:140%;'>|</span>&nbsp;&nbsp;" + 
								"<li><a href='" + subMenu1BHREF + "'>" + subMenu1BLINK + "</a></li>" +
							"</ul>";
		}


/*
SubMenu2() called by mouseOver() action on the second top level menu item.  Sets the bar image to white,
sets the horisontal location of the white bar to correspond to the above menu item and sets the submenu
span element innerHTML content to include the submenu list.  The submenu list adheres to the aqua style
submenu class 
*/		
	function submenu2()
		{
		// set the white bar as bar image source		
		element = document.getElementById("whiteBar");
		element.src = "images/whiteBar.gif";

		// set the white bar left margin
		element = document.getElementById("whiteBarLeft");
		element.width = "23%";
		
		// set the white bar right margin
		element = document.getElementById("whiteBarRight");
		element.width = "77%";
		
		// set the submenu left margin
		element = document.getElementById("submenuLeft");
		element.width = "22%";
		
		// fill the submenu span element with the submenu list		
		element = document.getElementById("submenu");
		element.innerHTML = "<ul class='submenu'>" +
								"<li class='first'><a href='" + subMenu2AHREF + "'>" + subMenu2ALINK + "</a></li>" +
				    			"&nbsp;&nbsp;<span style='color:#FFFFFF; font-size:140%;'>|</span>&nbsp;&nbsp;" + 			
								"<li><a href='" + subMenu2BHREF + "'>" + subMenu2BLINK + "</a></li>" +
								"&nbsp;&nbsp;<span style='color:#FFFFFF; font-size:140%;'>|</span>&nbsp;&nbsp;" + 
								"<li><a href='" + subMenu2CHREF + "'>" + subMenu2CLINK + "</a></li>" +
					        "</ul>";
		}


/*
SubMenu3() called by mouseOver() action on the third top level menu item.  Sets the bar image to white,
sets the horisontal location of the white bar to correspond to the above menu item and sets the submenu
span element innerHTML content to include the submenu list.  The submenu list adheres to the aqua style
submenu class 
*/
	function submenu3()
		{
		// set the white bar as bar image source			
		element = document.getElementById("whiteBar");
		element.src = "images/whiteBar.gif";

		// set the white bar left margin
		element = document.getElementById("whiteBarLeft");
		element.width = "37%";
		
		// set the white bar right margin
		element = document.getElementById("whiteBarRight");
		element.width = "63%";
		
		// set the submenu left margin
		element = document.getElementById("submenuLeft");
		element.width = "36%";
		
		// fill the submenu span element with the submenu list		
		element = document.getElementById("submenu");
		element.innerHTML = "<ul class='submenu'>" +
								"<li class='first'><a href='" + subMenu3AHREF + "'>" + subMenu3ALINK + "</a></li>" +
								"&nbsp;&nbsp;<span style='color:#FFFFFF; font-size:140%;'>|</span>&nbsp;&nbsp;" + 
				    			"<li><a href='" + subMenu3BHREF + "'>" + subMenu3BLINK + "</a></li>" +
					        "</ul>";
		}


/*
SubMenu4() called by mouseOver() action on the fourth top level menu item.  Sets the bar image to white,
sets the horisontal location of the white bar to correspond to the above menu item and sets the submenu
span element innerHTML content to include the submenu list.  The submenu list adheres to the aqua style
submenu class 
*/		
	function submenu4()
		{
		// set the white bar as bar image source			
		element = document.getElementById("whiteBar");
		element.src = "images/whiteBar.gif";
		
		// set the white bar left margin
		element = document.getElementById("whiteBarLeft");
		element.width = "52%";
		
		// set the white bar right margin
		element = document.getElementById("whiteBarRight");
		element.width = "48%";
		
		// set the submenu left margin
		element = document.getElementById("submenuLeft");
		element.width = "51%";
		
		// fill the submenu span element with the submenu list		
		element = document.getElementById("submenu");
		element.innerHTML = "<ul class='submenu'>" +
								"<li class='first'><a href='" + subMenu4AHREF + "'>" + subMenu4ALINK + "</a></li>" +
				    			"&nbsp;&nbsp;<span style='color:#FFFFFF; font-size:140%;'>|</span>&nbsp;&nbsp;" + 			
								"<li><a href='" + subMenu4BHREF + "'>" + subMenu4BLINK + "</a></li>" +
								"&nbsp;&nbsp;<span style='color:#FFFFFF; font-size:140%;'>|</span>&nbsp;&nbsp;" + 
								"<li><a href='" + subMenu4CHREF + "'>" + subMenu4CLINK + "</a></li>" +
					        "</ul>";
		}


/*
SubMenu5() called by mouseOver() action on the fifth top level menu item.  Sets the bar image to white,
sets the horisontal location of the white bar to correspond to the above menu item and sets the submenu
span element innerHTML content to include the submenu list.  The submenu list adheres to the aqua style
submenu class 
*/		
	function submenu5()
		{
		// set the white bar as bar image source			
		element = document.getElementById("whiteBar");
		element.src = "images/whiteBar.gif";
		
		// set the white bar left margin
		element = document.getElementById("whiteBarLeft");
		element.width = "62%";
		
		// set the white bar right margin
		element = document.getElementById("whiteBarRight");
		element.width = "38%";
		
		// set the submenu left margin
		element = document.getElementById("submenuLeft");
		element.width = "62%";
		
		// fill the submenu span element with the submenu list		
		element = document.getElementById("submenu");
		element.innerHTML = "<ul class='submenu'>" +
								"<li class='first'><a href='" + subMenu5AHREF + "'>" + subMenu5ALINK + "</a></li>" +
				    			"<span style='color:#666666; font-size:140%;'>|</span>" + 			
								// "<li><a href='#'>training</a></li>" +
					        "</ul>";
		}


/*
SubMenu6() called by mouseOver() action on the sixth top level menu item.  Sets the bar image to white,
sets the horisontal location of the white bar to correspond to the above menu item and sets the submenu
span element innerHTML content to include the submenu list.  The submenu list adheres to the aqua style
submenu class 
*/			
	function submenu6()
		{
		// set the white bar as bar image source		
		element = document.getElementById("whiteBar");
		element.src = "images/whiteBar.gif";
		
		// set the white bar left margin
		element = document.getElementById("whiteBarLeft");
		element.width = "73%";

		// set the white bar right margin
		element = document.getElementById("whiteBarRight");
		element.width = "27%";
		
		// set the submenu left margin
		element = document.getElementById("submenuLeft");
		element.width = "60%";
		
		// fill the submenu span element with the submenu list		
		element = document.getElementById("submenu");
		element.innerHTML = "";
		}