	changeCSS("Company","navoff");
	changeCSS("CaseStudies","navoff");
	changeCSS("Expertise","navoff");
	changeCSS("Clients","navoff");
	changeCSS("Contact","navoff");
	var menu;
	var menusub;
	var id;
	var id1;
	var id2;
	var css;
	
	//define the allLayers array to contain the names of all the layers.
	var allLayers = new Array('CompanySub1','caseS1','ExpertiseSub1','ClientsSub1');
	
	function HideAll() {     
		//hide all given layer by switching them all off.
		//loops through user-defined array of layers (var allLayers)
		for (i=0; i < allLayers.length; i++)
			LayerOnOff(allLayers[i],false);
	}
	
	function HideSubMenu() {     
		//hide all given layer by switching them all off.
		//loops through user-defined array of layers (var allLayers)
		for (i=2; i < 7; i++)
			LayerOnOff(allLayers[i],false);
	}
	
	function LayerOnOff(Layer, ShowIt) {
		//show or hide the given layer by switching it off. 
		//internal function, not to be called directly from the page.
		//Layer: pass in the DIV name like 'LR101'
		//ShowIt: block/none to show/hide the layer
		//Note: block/none is different then the true/false we normaly use
		//this will keep the table from taking up space on the page
		//when they are hidden
		
		if ((document.layers)||(document.all)||document.getElementById){
			//NS6 or IE7??
			if (document.getElementById) {
				elm = document.getElementById(Layer);
				elm.style.display = (ShowIt == true ? "block" : "none");
			}
			//IE not w3c compatible
			else if (document.all){
				eval("elm = document.all['" + Layer + "']");
				elm.style.display = (ShowIt == true ? "block" : "none");
			}
			//NS4
			else if (document.layers){
				eval("elm = document.layers['" + Layer + "']");
				elm.display = (ShowIt == true ? "show" : "hide");
			}
		}
	}		
	
	
	var URLSearch = document.location.search.substring(1,document.location.search.length);
	
	if (URLSearch.length > 1)
	{
	    var URLVars = URLSearch.split("&");
	    for (var x = 0; x < URLVars.length; x++) 
	    { 
			var Splitter = URLVars[x].split("=");
			eval ("var " + Splitter[0] + "='" + Splitter[1] + "'");		
	    }

		if (menu != null) { LayerOnOff(menu,true); }
		if (id != null) { changeCSS(id, "navon"); }
		if (id1 != null) { changeCSS(id1, "subnavon"); }
		if (id2 != null) {
			LayerOnOff(menusub,true);
			changeCSS(id2, "subnavon");
		}	
	}	
	
	
	// Check the main menu
	function checkCSS(idClick) {
		if (id != null) {changeCSS(id,"navoff");}
		if (id1 != null) {changeCSS(id1,"subnavoff");}
		if (id2 != null) {changeCSS(id2,"subnavoff");}
		changeCSS(idClick, "navon");
		id = idClick;
	}	
	
	// Check the sub menu level 2
	function checkCSS2(idClick2) {
		if (id1 != null) {changeCSS(id1,"subnavoff");}
		if (id2 != null) {changeCSS(id2,"subnavoff");}
		changeCSS(idClick2, "subnavon");
		id1 = idClick2;
	}
	
	// Change the css class
	function changeCSS(idMenu, newClass) {
		css=document.getElementById(idMenu);
		css.className=newClass;
	}		