//----------------------------------------------
//  Top Menu Navigation
//
//  Written by: Aaron Erickson
//  Copyright 2005 Encore Consulting Services
//----------------------------------------------

// inline style for the menu
function writeCustomStyle()
{
	document.writeln("<style>");
	document.writeln(".rootMenuCell {");
	document.writeln("		border-width: 0px 0px 0px 0px;");
	document.writeln("		padding: 0px 0px 1px 1px;");
	document.writeln("		border-style: solid solid solid solid;");
	document.writeln("		border-color: white white white white; }");
	document.writeln(".menuItemCellTop{");
	document.writeln("    border-width: 1px 1px 1px 1px;");
	document.writeln("		padding: 1px 1px 1px 1px;");
	document.writeln("		border-style: solid solid solid solid;");
	document.writeln("		border-color: #006ca1 #006ca1 #006ca1 #006ca1; }");
	document.writeln(".menuItemCell {");
	document.writeln("    border-width: 0px 1px 1px 1px;");
	document.writeln("    padding: 1px 1px 1px 1px;");
	document.writeln("    border-style: solid solid solid solid;");
	document.writeln("    border-color: #006ca1 #006ca1 #006ca1 #006ca1; }");
	document.writeln(".menuItemFont { font: 80% sans-serif }");
	document.writeln(".paraShow { display: block; }");
	document.writeln(".paraHide { display: none; }");
	document.writeln("</style>");
}

// shows the submenu
function showdiv(divName)
{
	var divObject = document.all(divName);
	divObject.className = "paraShow";
}

// hides the submenu
function hidediv(divName)
{
	var divObject = document.all(divName);
	divObject.className = "paraHide";
}

function putoutimage(idImg,imgName,backImg,menuDiv)
{
	//the genned script uses this to restore the default script
	putimage(idImg,imgName,backImg,'images/menu_bg.gif');
	if (menuDiv != null) hidediv(menuDiv);
}	
function putoverimage(idImg,imgName,backImg,menuDiv)
{
	//this handles placing the mouseover script
	putimage(idImg,imgName,backImg,'images/menu_bg_over.gif');
	if (menuDiv != null) showdiv(menuDiv);
}
function mouseoveritemcolor(idMenuCell)
{
	var cellObject = document.all(idMenuCell);
	cellObject.style.background = "#ff9900";
}
function mouseoutitemcolor(idMenuCell)
{
	var cellObject = document.all(idMenuCell);
	cellObject.style.background = "#729fd4";
}
function putimage(idImg,imgName,backImg,backName)
{
	//general image swapping routine
	var imageObject = document.all(idImg);
	var backObject = document.all(backImg);
	imageObject.src = imgName;
	backObject.src = backName;
}

function writeMenuItemNoSubs(menuName,outImage,overImage,rootURL,pctWidth)
{
	//routine to write a generic menu item
	var outImageEsc = outImage.replace("\\","\\\\");
	var overImageEsc = overImage.replace("\\","\\\\");
	var rootURLEsc = rootURL.replace("\\","\\\\");
	document.writeln("<td class=\"rootMenuCell\" width=\"" + pctWidth + "%\" align=\"left\" onmouseout=\"putoutimage('" + menuName + "_img','" + outImageEsc + "','" + menuName + "_back',null);\" onmouseover=\"putoverimage('" + menuName + "_img','" + overImageEsc + "','" + menuName + "_back');\">");
	document.writeln("    <div align=left style=\"position:relative;LEFT:0px;TOP:0px;WIDTH:100%;HEIGHT:40px;\">");
	document.writeln("      <div align=left style=\"position:absolute;LEFT:0px;TOP:0px;WIDTH:100%;HEIGHT:40px;z-index:1;\">");
	document.writeln("        <a href=\"" + rootURLEsc + "\">");
	document.writeln("           <img id=\"" + menuName + "_back\" border=0 style=\"width:100%;height:40px;z-index:1;\" src=\"images/menu_bg.gif\">");
	document.writeln("        </a>");
	document.writeln("      </div>");
	document.writeln("      <div align=center style=\"position:absolute;LEFT:0px;TOP:0px;WIDTH:98%;z-index:2;\">");
	document.writeln("        <a href=\"" + rootURLEsc + "\">");
	document.writeln("          <img id=\"" + menuName + "_img\" border=0 style=\"z-index:2;\" src=\"" + outImage + "\">");
	document.writeln("        </a>");
	document.writeln("      </div>");
	document.writeln("    </div>");
	document.writeln("</td>");
}

//write menu items here, in a seperate div that the onmouseover knows how to activate
function writeMenuItem(menuName,outImage,overImage,rootURL,pctWidth,menuItems,menuText,isLast)
{

  //routine to write a generic menu item
	var outImageEsc = outImage.replace("\\","\\\\");
	var overImageEsc = overImage.replace("\\","\\\\");
	var rootURLEsc = rootURL.replace("\\","\\\\");
	var menuDivArg = menuName + "_items";

	if (isLast)
  {
	  document.writeln("<td class=\"rootMenuCell\" width=\"" + pctWidth + "%\" align=\"right\" onmouseout=\"putoutimage('" + menuName + "_img','" + outImageEsc + "','" + menuName + "_back','" + menuDivArg + "')\" onmouseover=\"putoverimage('" + menuName + "_img','" + overImageEsc + "','" + menuName + "_back','" + menuDivArg + "')\">");
  }
  else
	{
	  document.writeln("<td class=\"rootMenuCell\" width=\"" + pctWidth + "%\" align=\"left\" onmouseout=\"putoutimage('" + menuName + "_img','" + outImageEsc + "','" + menuName + "_back','" + menuDivArg + "')\" onmouseover=\"putoverimage('" + menuName + "_img','" + overImageEsc + "','" + menuName + "_back','" + menuDivArg + "')\">");
  }

  document.writeln("        <a href=\"" + rootURLEsc + "\">");
  document.writeln("    <span>");
  document.writeln("    <div align=left style=\"position:relative;LEFT:0px;TOP:0px;WIDTH:100%;HEIGHT:40px;\">");
  document.writeln("      <div align=left style=\"position:absolute;LEFT:0px;TOP:0px;WIDTH:100%;HEIGHT:40px;z-index:1;\">");
  document.writeln("        <a href=\"" + rootURLEsc + "\">");
  document.writeln("         <img id=\"" + menuName + "_back\" border=0 style=\"width:100%;height:40px;z-index:1;\" src=\"images/menu_bg.gif\">");
  document.writeln("        </a>");
  document.writeln("      </div>");
  document.writeln("      <div align=center style=\"position:absolute;LEFT:0px;TOP:0px;WIDTH:100%;z-index:2;\">");
  document.writeln("        <a href=\"" + rootURLEsc + "\">");
  document.writeln("          <img id=\"" + menuName + "_img\" border=0 style=\"z-index:2;\" src=\"" + outImage + "\">");
  document.writeln("        </a>");
  document.writeln("      </div>");
  document.writeln("      <div align=left style=\"position:absolute;LEFT:0px;TOP:0px;WIDTH:100%;z-index:3;\">");
  document.writeln("        <a href=\"" + rootURLEsc + "\">");
  document.writeln("          <img id=\"" + menuName + "_space\" border=0 style=\"width:1px;height:40px;z-index:3;\" src=\"images/whitepixel.gif\">");
  document.writeln("        </a>");
  document.writeln("      </div>");
  document.writeln("    </div>");
  document.writeln("    </span>");
  document.writeln("        </a>");
 

	//write the div wrapper
  if (isLast)
  {
    document.writeln("<div align=right style=\"position:relative;RIGHT:0px;TOP:0px;WIDTH:70%;HEIGHT:0px;\">");
    document.writeln("   <div id=\"" + menuDivArg + "\" class=\"paraHide\" align=right style=\"position:absolute;RIGHT=0px;TOP:0px;WIDTH:100%;z-index:2;\">");
  }
  else
  {
    document.writeln("<div align=left style=\"position:relative;LEFT:0px;TOP:0px;WIDTH:70%;HEIGHT:0px;\">");
    document.writeln("   <div id=\"" + menuDivArg + "\" class=\"paraHide\" align=left style=\"position:absolute;LEFT=0px;TOP:0px;WIDTH:100%;z-index:2;\">");
  }
  
  //write the table element line
  document.writeln("      <table bgcolor=\"#729fd4\" cellspacing=0 cellpadding=2 border=0>");
  	
	//write each cell for the menu item table
  var i;
  var theLink;
  var theText;
  var mouseOverAndOut;
  for (i = 0; i < menuItems.length; i++)
  {
    if (menuItems[i].length > 0)
		{
			theLink = menuItems[i];
			theText = "&nbsp;&nbsp;" + menuText[i] + "&nbsp;&nbsp;";
			mouseOverAndOut = " onMouseOver=\"mouseoveritemcolor('" + menuName + "_link_" + i + "')\" onMouseOut=\"mouseoutitemcolor('" + menuName + "_link_" + i + "')\"";
			
			document.writeln("      <tr>");
			if (i == 0)
			{
				document.writeln("          <td id=" + menuName + "_link_" + i + " width=100% class=\"menuItemCellTop\"" + mouseOverAndOut + " >");	
			}
			else
			{
				document.writeln("          <td id=" + menuName + "_link_" + i + " width=100% class=\"menuItemCell\"" + mouseOverAndOut + ">");		
			}
			document.writeln("            <a href=\"" + theLink + "\" style=\"font: 80% sans-serif;cellpadding:2;color:white;text-decoration:none;width: 100%;\">" + theText + "</a>");
			document.writeln("          </td>");
			document.writeln("        </tr>");
		}
  }	
  
  document.writeln("      </table>");	
  //close the div wrapper
  document.writeln("   </div>");
  document.writeln("</div>");
  document.writeln("</td>");				  	
  	
 }
 
 function writeTheMenu()
 {
     writeCustomStyle();
     document.writeln("<table width=100% cellspacing=0 cellpadding=0 border=0 style=\"z-index:5\">");
	   document.writeln("<tr>");
     writeMenuItemNoSubs('homemenu1','images/home_normal.gif','images/home_over.gif','index.html','10');
	
	   // Start: Links for menu	  


		 //write the biz consulting menu
		 var menu4Link = new Array(4);
		 var menu4Text = new Array(4);
		 menu4Link[0] = "4-1-enterpriseperformancemanagement.html";
		 menu4Text[0] = "Enterprise&nbsp;Performance&nbsp;Management";
		 menu4Link[1] = "4-2-businessprocessinnovation.html";
		 menu4Text[1] = "Business&nbsp;Process&nbsp;Innovation&nbsp;and&nbsp;Management";
		 menu4Link[2] = "4-3-changeandtransformationmanagement.html";
		 menu4Text[2] = "Change&nbsp;and&nbsp;Transformation&nbsp;Management";
		 menu4Link[3] = "4-4-portfoliooptimization.html";
		 menu4Text[3] = "Portfolio&nbsp;Optimization";

		 //define your own links here later
		 writeMenuItem('bizmenu','images/businessconsulting_normal.gif','images/businessconsulting_over.gif','4-0-businessconsulting.html','10',menu4Link,menu4Text,false);

		 //write the technical consulting menu
		 var menu3Link = new Array(7);
		 var menu3Text = new Array(7);
		 menu3Link[0] = "3-1-customapplicationdevelopment.html";
		 menu3Text[0] = "Custom&nbsp;Application&nbsp;Development";
		 menu3Link[1] = "3-7-webdevelopment.html";
		 menu3Text[1] = "Web&nbsp;Development";
		 menu3Link[2] = "3-3-businessintelligence.html";
		 menu3Text[2] = "Business&nbsp;Intelligence&nbsp;Systems";
		 menu3Link[3] = "3-4-datawarehousing.html";
		 menu3Text[3] = "Data&nbsp;Warehousing&nbsp;&amp;&nbsp;Data&nbsp;Marts";
		 menu3Link[4] = "3-6-databases.html";
		 menu3Text[4] = "Database&nbsp;Development&nbsp;and&nbsp;Administration";
		 menu3Link[5] = "3-2-packageimplementationservices.html";
		 menu3Text[5] = "Package&nbsp;Implementation&nbsp;Services";
		 menu3Link[6] = "3-9-offshoreservices.html";
		 menu3Text[6] = "Offshore&nbsp;Services";
		 menu3Link[7] = "6-3-2-ibm.html";
		 menu3Text[7] = "IBM";
		 menu3Link[8] = "6-3-1-microsoft.html";
		 menu3Text[8] = "Microsoft";
		 menu3Link[9] = "6-3-10-SAP.html";
		 menu3Text[9] = "SAP";
		 menu3Link[10] = "3-10-AppScan.html";
		 menu3Text[10] = "Security&nbsp;Offerings";
		 
		 writeMenuItem('techmenu','images/technologyconsulting_normal.gif','images/technologyconsulting_over.gif','3-0-technicalconsulting.html','10',menu3Link,menu3Text,false);

		 //write the project management menu
		 var menu2Link = new Array(4);
		 var menu2Text = new Array(4);
		 menu2Link[0] = "3-3-1-projectmanagementoffice.html";
		 menu2Text[0] = "Project&nbsp;Management&nbsp;Office&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		 menu2Link[1] = "3-3-2-pmstaffing.html";
		 menu2Text[1] = "PM&nbsp;Staffing";
		 menu2Link[2] = "3-3-3-projectrescue.html";
		 menu2Text[2] = "Project&nbsp;Rescue";
		 menu2Link[3] = "3-3-4-pmtrainingcoaching.html";
		 menu2Text[3] = "PM&nbsp;Training&nbsp;&amp;&nbsp;Coaching";
		 writeMenuItem('indmenu','images/ProjectManagement_normal.gif','images/ProjectManagement_over.gif','3-3-projectmanagementservices.html','10',menu2Link,menu2Text,false);
		 
		 //write the careers menu
		 var menu5Link = new Array(3);
		 var menu5Text = new Array(3);
		 menu5Link[0] = "5-1-opportunities.html";
		 menu5Text[0] = "Career&nbsp;Opportunities&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		 menu5Link[1] = "5-3-codeofperformance.html";
		 menu5Text[1] = "Code&nbsp;of&nbsp;Performance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		 menu5Link[2] = "5-2-benefits.html";
		 menu5Text[2] = "Benefits&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		 writeMenuItem('careersmenu','images/careers_normal.gif','images/careers_over.gif','5-0-careers.html','10',menu5Link,menu5Text,false);

		 //write the about us menu
		 var menu6Link = new Array(5);
		 var menu6Text = new Array(5);
		 menu6Link[0] = "6-1-contactus.html";
		 menu6Text[0] = "Contact&nbsp;Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		 menu6Link[1] = "6-8-Webinars&Seminars.html";
		 menu6Text[1] = "Webinars & Seminars";
		 menu6Link[2] = "6-9-Case_Studies.html";
		 menu6Text[2] = "Case Studies";
		 menu6Link[3] = "6-10-news.html";
		 menu6Text[3] = "Encore News";
		 menu6Link[4] = "6-3-alliances.html";
		 menu6Text[4] = "Alliances";
		 menu6Link[5] = "6-6-affiliations.html";
		 menu6Text[5] = "Affiliations";
		 menu6Link[6] = "6-4-clientlist.html";
		 menu6Text[6] = "Client&nbsp;List";
		 menu6Link[7] = "6-5-leadership.html";
		 menu6Text[7] = "Leadership";
		 writeMenuItem('aboutmenu','images/about_us_normal.gif','images/about_us_over.gif','6-0-aboutus.html','10',menu6Link,menu6Text,true);
	// End: Links for menu
 
     document.writeln("</tr>");	    			    			    			    			    	
     document.writeln("</table>");
 }
 
 writeTheMenu();
 
 