// Script to highlight the left icon that this page is under.
// Requires that we keep the below lists current when adding or removing pages
// from the site.

// These arrays correspond to the link icons on the site 
// Every page on the site must be listed in one of these 4 arrays, in order
// for an icon to be "ON" on that page.
icons = new Array(4);
// Solutions
icons[0] = new Array("/coaching_introduction.shtml",
		"/team_coaching.shtml",
		"/group_coaching.shtml",
		"/executive_coaching.shtml",
		"/mls_coaching.shtml",
		"/experiential_introduction.shtml",
		"/beyond_blues.shtml",
		"/whats_your_lie.shtml",
		"/equine_learning.shtml",
		"/way_ofthe_horse.shtml",
		"/organization_introduction.shtml",
		"/strategic_planning.shtml",
		"/post_merger_integration.shtml",
		"/change_management.shtml",
		"/metameeting_management.shtml");
// Company
icons[1] = new Array("/team.shtml",
		"/client_list.shtml",
		"/company.shtml",
		"/links.shtml",
		"/contact.shtml");
// Resources
icons[2] = new Array("/articles.shtml",
		"/approach.shtml",
		"/axioms.shtml",
		"/upcoming_events.shtml",
		"/newsletters.shtml");
// Issues
icons[3] = new Array("/executive_development.shtml",
		"/team_performance.shtml",
		"/strategic_thinking.shtml",
		"/merger_integration.shtml");

// Create an array for the HTML we will be writing
// The first index must match the arrays above.
// Array position [X][0] == the OFF icon.
// Array position [X][1] == the ON icon.
images = new Array(4);
// Solutions
var solutions_generic = ' width="131" height="86" alt="" border="0" name="menu2" id="menu2" onmouseover="showMenu(event)" onmouseout="hideMenu(event)">';
images[0] = new Array('<img src="/link_solutions_off.gif"' + solutions_generic,
			'<img src="/link_solutions_on.gif"' + solutions_generic);
// Company
var company_generic = ' width="131" height="86" alt="" border="0" name="menu0" id="menu0" onmouseover="showMenu(event)" onmouseout="hideMenu(event)">';
images[1] = new Array('<img src="/link_company_off.gif"' + company_generic,
			'<img src="/link_company_on.gif"' + company_generic);
// Resources
var resources_generic = ' width="131" height="86" alt="" border="0" name="menu3" id="menu3" onmouseover="showMenu(event)" onmouseout="hideMenu(event)">';
images[2] = new Array('<img src="/link_resources_off.gif"' + resources_generic,
			'<img src="/link_resources_on.gif"' + resources_generic);
// Issues
var issues_generic = ' width="131" height="86" alt="" border="0" name="menu1" id="menu1" onmouseover="showMenu(event)" onmouseout="hideMenu(event)">';
images[3] = new Array('<img src="/link_issues_off.gif"' + issues_generic,
			'<img src="/link_issues_on.gif"' + issues_generic);

// Scan through all the arrays
for ( i in icons ) {
   for ( j in icons[i] ) {
      output = images[i][0]; 
      // Is the currently displayed page listed in the icons array?
      if ( document.location.pathname == icons[i][j] ) {
         // Found it, Display the ON icon and leave.
         output = images[i][1]; 
         break;
      }
   }
   // Write the HTML to display an icon, either ON or OFF.
   document.write(output);
}

