// JavaScript Document

// This array holds the names of each drop menu and their default state.
var navDivNames = [['subAboutus','hide'],
					['subInvestments','hide'],
					['subNews','hide']];

function showHide(showMe){
	
	if(showMe != 'hideAll'){		
		for (var i = 0; i < navDivNames.length; i++){
			if(document.getElementById(navDivNames[i][0]).style.visibility == "visible"){
				document.getElementById(navDivNames[i][0]).style.visibility = "hidden";	
			}
			if(navDivNames[i][0] == showMe){
				document.getElementById(navDivNames[i][0]).style.visibility = "visible";					
			}
		}
	}
	else{
		for (var j = 0; j < navDivNames.length; j++){
			document.getElementById(navDivNames[j][0]).style.visibility = "hidden";
		}
	}	
}


/* THE FOLLOWING JAVASCRIPT CODE COPYRIGHT OUTCROP GROUP & OUTCROP INTERACTIVE 2004 */
function navOn(){

//url=location.toString(); 	/*Turns URL into a string*/

	//if(url.search("about_us") != -1){			/*searches the url string for a match*/ 
	//	document.getElementById("about_us").className = "on";
	//}
	//else if(url.search("investments") != -1){			/*searches the url string for a match*/ 
		//document.getElementById("investments").className = "on";
	//}
	//else if(url.search("news") != -1){			/*searches the url string for a match*/ 
	//	document.getElementById("news").className = "on";
//	}
//	else if(url.search("reports") != -1){			/*searches the url string for a match*/ 
//		document.getElementById("reports").className = "on";
//	}
//	else if(url.search("gallery") != -1){			/*searches the url string for a match*/ 
	//	document.getElementById("gallery").className = "on";
//	}
//	else if(url.search("contact_us") != -1){			/*searches the url string for a match*/ 
	//	document.getElementById("contact_us").className = "on";
//	}
}


  // this function is needed to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  } 
