/* colors the navigation button that it is currently at */
function colorNavLink() {
	url = document.URL;
	fidx = url.lastIndexOf("/") + 1;
	url = url.substr(fidx);
	lidx = url.indexOf(".");
	file = url.substring(0, lidx);
	var id = "";
	switch(file){
		case "who_we_are": id = "L1";
		break;
		case "management_team": id= "L2";
		break;
		case "portfolio_companies": id="L3";
		break;
		case "news": id="L4";
		break;
		case "resources": id="L5";
		break;
		case "contact_us": id="L6";
		break;
	}
	document.getElementById(id).style.backgroundColor = "Black";
	document.getElementById(id).onmouseout = "";

}

/* unselects the link unless the link is the current page */
function unSelectNav(obj){

	url = document.URL;
	fidx = url.lastIndexOf("/") + 1;
	url = url.substr(fidx);
	lidx = url.indexOf(".");
	file = url.substring(0, lidx);
	
	var iscurrpage = false;
	//alert(obj.id);
	
	switch(obj.id) {
		case "L1":
		if(file=="who_we_are") iscurrpage=true;
		break;
		case "L2":
		if(file=="management_team") iscurrpage=true;
		break;
		case "L3":
		if(file=="portfolio_companies") iscurrpage=true;
		break;
		case "L4":
		if(file=="resources") iscurrpage=true;
		break;
		case "L5":
		if(file=="contact_us") iscurrpage=true;
		break;
	}
	if(!iscurrpage)
		obj.style.backgroundColor='#6e7271';
}

/*  highlights the link of the current news article on the index.php page */
function highlight(obj){
	var i=1;
	while(i<6) {
		document.getElementById("N" + i).style.backgroundColor = "#6E7271";
		i++;
	}
	obj.style.backgroundColor = "#9B0002";
}
