// JavaScript Document

if (window.addEventListener){
	window.addEventListener("load", subNavParentShower, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", subNavParentShower);
}


function subNavParentShower() {
	var currentItemParent = document.getElementById("houseMenuCurrentItem").parentNode;
//	alert(currentItemParent.id);
//	currentItemParent.className = "shown";
	currentItemParent.style.display = "block";	
	var secondParentUp = currentItemParent.parentNode;
	secondParentUp.style.display = "block";	
	var thirdParentUp = secondParentUp.parentNode;
	thirdParentUp.style.display = "block";	
	var fourthParentUp = thirdParentUp.parentNode;
	fourthParentUp.style.display = "block";	
	var fifthParentUp = fourthParentUp.parentNode;
	fifthParentUp.style.display = "block";	
	
	var listIds = new Array();
	listIds[0] = ["Sub Nav AboutList56", 1];
	listIds[1] = ["Sub Nav AboutList57", 2];
	listIds[2] = ["Sub Nav AboutList58", 3];
	listIds[3] = ["Sub Nav AboutList60", 4];
	listIds[4] = ["Sub Nav AboutList61", 5];
	listIds[5] = ["Sub Nav AboutList64", 6];
	
	for (var x=0;x<listIds.length;x++) {
		//alert(listIds[x][0]);
		if(currentItemParent.id == listIds[x][0] ||
			secondParentUp.id== listIds[x][0] ||
			thirdParentUp.id == listIds[x][0] ||
			fourthParentUp.id == listIds[x][0] ||
			fifthParentUp.id == listIds[x][0]){
			//alert(listIds[x][0]);
			var mainNav = document.getElementById("MainNav0").childNodes;
			for (var n=0;n<mainNav.length;n++) {
				if(n==listIds[x][1]){
					mainNav[n].id = "houseMenuCurrentItem";
				}
			}
		}
	}

}
