

//Total elements of the navbar

var numberOfElements = 5;
var hrefArray = new Array(numberOfElements-1);

//This array sets the destination of the button
hrefArray[0] = "/corp/operating_companies/operatingcompanies.htm?Vermenu=operatingcompanies";
hrefArray[1] = "/corp/aboutcox/comp_overview.htm?Vermenu=comp_overview";
hrefArray[2] = "/corp/comp_values/coxvalues.htm?Vermenu=coxvalues";
hrefArray[3] = "http://coxenterprises.mediaroom.com";
//hrefArray[4] = "/coxcareer/?Vermenu=career_opp";
hrefArray[4] = "/coxcareer/?Vermenu=career_opp";

//This array sets the images for the onMouseOver event on each button.
var onMouseOverImagesArray = new Array(numberOfElements-1);

onMouseOverImagesArray[0] = "/corp/images/operating_ro.gif";
onMouseOverImagesArray[1] = "/corp/images/aboutcox_ro.gif";
onMouseOverImagesArray[2] = "/corp/images/companyvalues_ro.gif";
onMouseOverImagesArray[3] = "/corp/images/presscenter_ro.gif";
onMouseOverImagesArray[4] = "/corp/images/career_ro.gif";

//This array sets the images for each button.
var imgSourceArray = new Array(numberOfElements-1);

imgSourceArray[0] = "/corp/images/operating.gif";
imgSourceArray[1] = "/corp/images/aboutcox.gif";
imgSourceArray[2] = "/corp/images/companyvalues.gif";
imgSourceArray[3] = "/corp/images/presscenter.gif";
imgSourceArray[4] = "/corp/images/career.gif";

//This array sets the images for each button when its function on main frame is active.
var activeImagesArray = new Array(numberOfElements-1);

activeImagesArray[0] = "/corp/images/operating_sel.gif";
activeImagesArray[1] = "/corp/images/aboutcox_sel.gif";
activeImagesArray[2] = "/corp/images/companyvalues_sel.gif";
activeImagesArray[3] = "/corp/images/presscenter_sel.gif";
activeImagesArray[4] = "/corp/images/career_sel.gif";
   

//Auxiliary array for the name parameter in the <img> element for each button.
var imgNameArray = new Array(numberOfElements-1);

imgNameArray[0] = "Operating";
imgNameArray[1] = "About";
imgNameArray[2] = "CompValues";
imgNameArray[3] = "PressCenter";
imgNameArray[4] = "Career";


//Auxiliary array for the target parameter in the <a> hyperlink element for each button.
var targetArray = new Array(numberOfElements-1);

targetArray[0] = "_self";
targetArray[1] = "_self";
targetArray[2] = "_self";
targetArray[3] = "_self";
targetArray[4] = "_self";

//Auxiliary array for the width parameter in the <a> hyperlink element for each button.
var widthArray = new Array(numberOfElements-1);

widthArray[0] = "154";
widthArray[1] = "154";
widthArray[2] = "154";
widthArray[3] = "154";
widthArray[4] = "154";

var heightArray = new Array(numberOfElements-1);
heightArray[0] = "29";
heightArray[1] = "30";
heightArray[2] = "29";
heightArray[3] = "29";
heightArray[4] = "30";


//Auxiliary array for the active parameter.
var activeSectionsArray = new Array(numberOfElements-1);

activeSectionsArray[0] = "operatingcompanies";
activeSectionsArray[1] = "comp_overview";
activeSectionsArray[2] = "coxvalues";
activeSectionsArray[3] = "presscenter";
activeSectionsArray[4] = "career_opp";



//defines active selection
function extractIndex(activeSection)
{

        var result = -1;
        for (var k=0; k< numberOfElements; k++)
        {
		if (activeSection == activeSectionsArray[k])
		{
			result = k;
		}
	}
	
	return result;

}

//Opening Table Tag Element
document.write('<table width="111" border="0" cellpadding="0" cellspacing="0" id="LeftNavBar" >');

	var tableCode = "";
    var strQuery = window.location.search;
//	var strQueryArray = strQuery.split("=");
	//var activeIndex = extractIndex(strQueryArray[1]);
	var strvalue="";


	
	var newvar =strQuery.split("Vermenu=");
	if (newvar[1]!=null){
	//alert(newvar[1]);
		var strval=newvar[1].split("&");
		strvalue=strval[0];
		//alert(strvalue);
		
	}
	
	
	var activeIndex = extractIndex(strvalue);
	
	
	//var activeIndex = extractIndex("broadband");

//First element of the Navbar needs special treatment
	
	var k=0;
 //Prints the rest of the Navbar
	for (k=0; k< numberOfElements; k++)
  	{
		
  		tableCode += '<tr><td>';
  		tableCode += '<a href="'+ hrefArray[k] +'" target="' + targetArray[k] + '" id = "anchorId' + k + '" onMouseOut="MM_swapImgRestore()" ';
  		//tableCode += 'onMouseOver="MM_swapImage(\'' + imgNameArray[k] + '\',\'\',\''+ onMouseOverImagesArray[k] + '\',1)">';
  		if (k != activeIndex)
  		tableCode += 'onMouseOver="MM_swapImage(\'' + imgNameArray[k] + '\',\'\',\''+ onMouseOverImagesArray[k] + '\',1)"';
  		tableCode += '>';

  		if (k != activeIndex)
  		{
  			tableCode += '<img src="' + imgSourceArray[k] +'" width="' + widthArray[k] + '" height="' + heightArray[k] + '" alt="' + activeSectionsArray[k] + '" border="0" name="' + imgNameArray[k] +'"></a>';
  		}
  		else
  		{
		  tableCode += '<img src="' + activeImagesArray[k] +'" width="' + widthArray[k] + '" height="' + heightArray[k] + '" alt="' + activeSectionsArray[k] + '" border="0" name="' + imgNameArray[k] +'"></a>';
  		}
  		
  	
		
		tableCode += '</td></tr>';	
	}
  
	tableCode+='<tr><td><img src="/corp/images/littlebit.gif" width="154" height="29" border="0"></td></tr>';

//Prints the html code for the navigation bar
  	document.write(tableCode);

//Closing Table Tag Element
document.write('</table>');



