var menu = [];
 menu[0] = new Array("120",
			         "<li><a href='index.php' id='psm0' style='margin-left:", "px'>Home</a></li>",
					 "<li><a href='ig-1-OurProcesses.php' id='psm1'>Our Processes</a></li>",
					 "<li><a href='ig-2-Coaching.php'>About Us</a></li>",
					 "<li><a href='ig-3-ContactUs.php?xxx=0'>Contact Us</a></li>",
					 "<li><a href='ig-4-AboutUs.php'>About Us</a></li>",
					 "<li><a href='#'>Indigo Blog</a></li>",
					 "<li><a href='ig-6-Affiliates.php'>Affiliates</a></li>");

 menu[1] = new Array("18",  
					 "<li><a href='ig-PO1-ExecutiveLeadership.php' id='psm0' style='margin-left:", "px'>Executive Leadership</a></li>",
					 "<li><a href='ig-PO2-Leadership.php' id='psm1'>Leadership</a></li>",
					 "<li><a href='ig-PO3-ManagementDevelopment.php' id='psm2'>Management</a></li>",
					 "<li><a href='ig-PO4-Supervision.php' id='psm3'>Supervision</a></li>",
					 "<li><a href='ig-PO5-Sales.php' id='psm4'>Sales</a> </li>",
					 "<li><a href='ig-PO6-RisingStars.php' id='psm5'>Rising Stars</a></li>",
					 "<li><a href='ig-POC-TimeStrategies.php' id='psm6'>Time Strategies</a></li>",
					 "<li><a href='ig-POD-CustomerLoyalty.php' id='psm7'>Customer Loyalty</a></li>");

menu[2] = new Array("25",
					 "<li><a id='psm0' href='ig-D1-PersonalEffectiveness.php' style='margin-left:", "px'>Personal Effectiveness</a></li>",
					 "<li><a id='psm1' href='ig-D2-CommunicationSkills.php'>Communication Skills</a></li>",
					 "<li><a id='psm2' href='ig-D3-PresentationSkills.php'>Presentation Skills</a></li>",
					 "<li><a id='psm3' href='ig-D4-MeetingSkills.php'>Meeting Skills</a></li>",
					 "<li><a id='psm4' href='ig-D5-InfluencingSkills.php'>Influencing Skills</a></li>",
					 "<li><a id='psm5' href='ig-D6-EffectiveTeams.php'>Effective Teams</a></li>");
					 
					 
 menu[3] = new Array("50",
					 "<li><a href='ig-POA-StrategicPlanning.php' id='psm0' style='margin-left:", "px'>Strategic Planning</a></li>",
					 "<li><a href='ig-POB-EntrepreneurialStrategicThinking.php' id='psm1'>Entrepreneurial Leadership and Strategic Thinking</a></li>",
					 "<li><a href='ig-POC-ManagementAwarenessCustLoyalty.php' id='psm2'>Management Awareness and Customer Loyalty</a></li>");

 menu[4] = new Array("250",
					 "<li><a href='ig-PTA-TeamBuilding.php' id='psm0' style='margin-left:","px'>Team Building</a></li>",
					 "<li><a href='ig-PTB-TeamCouples.php' id='psm1'>Team Building for Retired Couples</a></li>");

 menu[5] = new Array("300",
					 "<li><a href='ig-PTX-AttributeIndex.php' id='psm0' style='margin-left:","px'>The Attribute Index</a></li>",
					 "<li><a href='ig-PTY-DIALOG.php' id='psm1'>D.I.AL.O.G</a></li>");

 menu[6] = new Array("","&nbsp;","");
 
var lastMenuItem = -1
var lastBgColor = 0;

function showSubMenu(P, S) {       
// P = Process Category No: this upper menu item is highlighted in cadet blue: indicates which sub-menu is displayed
// S = Sub Process No: indicates the page selected and item on sub-menu to be highighted

// build HTML for sub-menu and display
     var strP = menu[P][1] + menu[P][0] + menu[P][2];              // programmatically adjust left margin to center sub-menu
	     for (i = 3; i < menu[P].length; i++) strP += menu[P][i];
         document.getElementById("navSubProc").innerHTML = strP;   // sub-menu html
		 
         if (lastMenuItem != -1) { 
		   document.getElementById("pm" + lastMenuItem).style.backgroundColor = lastBgColor;  // restore preiously highlighted menu item
		 }
		 lastMenuItem = P;
		 
// highlight upper menu item (process category)		 
	 var elem = document.getElementById("pm" + P);
		 lastBgColor = elem.style.backgroundColor;
		 elem.style.color = "white";
		 elem.style.backgroundColor = "cadetBlue";
	     elem.style.borderRightColor = "black";
	     elem.style.borderLeftColor = "black";
		 
         if (P != proc)  return;
		 if (S == -1) S = subProc;
		 elem = document.getElementById("psm" + S);
		 elem.style.backgroundColor = "darkViolet";
		 elem.style.color = "turquoise";
	     elem.style.borderRightColor = "cadetBlue";
	     elem.style.borderLeftColor = "cadetBlue";
}
function setM(n) {
     var elem= document.getElementById("mm" + n);
         elem.style.backgroundColor="darkViolet";
         elem.style.color="turquoise";
	     elem.style.borderRightColor = "black";
	     elem.style.borderLeftColor = "black";
 }
 
