
/*******************************************************

Skript for horizontal navigation version 3

*******************************************************/

var tempNav2 = [];
var tempNav3 = [];

var colorNav1 = [];
var colorNav2 = [];
var colorNav3 = [];

function colNav1(id) {
	//alert("mark "+id);
	resetCol();
	colorNav1.push(id);
	document.getElementById(id).style.color="#d84e13";	
}

function decolNav1() {
	for (var i=0; i<colorNav1.length; i++){
		document.getElementById(colorNav1.pop()).style.color="#000000";
	}
}

function colNav2(id) {
	//alert("mark "+id);
	decolNav2();
	decolNav3();
	colorNav2.push(id);
	document.getElementById(id).style.color="#d84e13";	
}

function decolNav2() {
	for (var i=0; i<colorNav2.length; i++){
		document.getElementById(colorNav2.pop()).style.color="#000000";
	}
}

function colNav3(id) {
	//alert("mark "+id);
	decolNav3();
	colorNav3.push(id);
	document.getElementById(id).style.color="#d84e13";	
}

function decolNav3() {
	for (var i=0; i<colorNav3.length; i++){
		document.getElementById(colorNav3.pop()).style.color="#000000";
	}
}

function resetCol() {
	decolNav1();
	decolNav2();
	decolNav3();
}

function showNav2 (id) {
	//alert("showNav2("+id+")");
	hideNav2();
	tempNav2.push(id);
	document.getElementById(id).style.visibility="visible";
	document.getElementById(id).style.zIndex=2;
	document.getElementById("navlevel-3-white").style.visibility="visible";
	document.getElementById("navlevel-3-white").style.zIndex=2;
	//alert(tempNav2);
}

function hideNav2() {
	//alert("hideNav2()");
	for (var i=0; i<tempNav2.length; i++){
		div=tempNav2.pop();
		document.getElementById(div).style.visibility="hidden";
		document.getElementById(div).style.zIndex=0;
		//alert(tempNav2);
	}
	hideNav3();
}

function showNav3 (id) {
	//alert("showNav3("+id+")");
	clearNav3();
	document.getElementById("navlevel-3-white").style.visibility="visible";
	document.getElementById("navlevel-3-white").style.zIndex=2;
	if(document.getElementById(id)==null)
		return;	
	tempNav3.push(id);
	document.getElementById(id).style.visibility="visible";
	document.getElementById(id).style.zIndex=3;
	//alert("Done");
}

function hideNav3() {
	//alert("hideNav3()");
	clearNav3();
	document.getElementById("navlevel-3-white").style.visibility="hidden";	
	document.getElementById("navlevel-3-white").style.zIndex=0;
}

function clearNav3() {
	for (var i=0; i<tempNav3.length; i++){
		div=tempNav3.pop();
		document.getElementById(div).style.visibility="hidden";
		document.getElementById(div).style.zIndex=0;
		//alert(tempNav3);
	}
}

function hideNav() {
	hideNav3();
	hideNav2();
}

function displayNav (id) {
	document.getElementById(id).style.visibility="visible";
	//alert(tempNav2);
}

function showVar(){
	alert("2: " + tempNav2);
	alert("3: " + tempNav3);
}


