function mouseOverSubTab(parent) {
	parent.style.cursor = "pointer";
	changeSubTab(parent.id, "");
}
function mouseOutSubTab(parent) {
}
function mouseOverTopTabsA(parent) {
	document.getElementById(parent).style.cursor = "pointer";
	if (document.getElementById(parent).className != "tab-red-left") {
		changeTab(parent, "");
	}
}
function mouseOutTopTabsA(parent) {
	if (document.getElementById(parent).className != "tab-red-left") {
		changeTabBack(parent, "");
	}
}
function mouseOverTopTabsB(parent) {
	document.getElementById(parent).style.cursor = "pointer";
	if (document.getElementById(parent).className != "tab-red") {
		changeTab(parent, "");
	}
}
function mouseOutTopTabsB(parent) {
	if (document.getElementById(parent).className != "tab-red") {
		changeTabBack(parent, "");
	}
}
function mouseOverTopTabsC(parent) {
	document.getElementById(parent).style.cursor = "pointer";
	if (document.getElementById(parent).className != "tab-red-right") {
		changeTab(parent, "");
	}
}
function mouseOutTopTabsC(parent) {
	if (document.getElementById(parent).className != "tab-red-right") {
		changeTabBack(parent, "");
	}
}
//this bit is for side menu
function mouseOverTop(parent) {
	parent.style.cursor = "pointer";
	if (parent.className != "kNavTopSelected") {
		parent.style.backgroundColor = "#999999";
		parent.style.color = "#ffffff";
	}
}
function mouseOutTop(parent) {
	if (parent.className != "kNavTopSelected") {
		parent.style.backgroundColor = "#ffffff";
		parent.style.color = "#000000";
	}
}
function mouseOverMid(parent) {
	parent.style.cursor = "pointer";
	if (parent.className != "kNavMiddleSelected") {
		parent.style.backgroundColor = "#999999";
		parent.style.color = "#ffffff";
	}
}
function mouseOutMid(parent) {
	if (parent.className != "kNavMiddleSelected") {
		parent.style.backgroundColor = "#dddddd";
		parent.style.color = "#000000";
	}
}
function mouseOverBot(parent) {
	parent.style.backgroundColor = "#999999";
	parent.style.cursor = "pointer";
}
function mouseOutBot(parent) {
	parent.style.backgroundColor = "#b1b1b1";
}
// finished side menu bit
function changeTab(tabnum, protocol) {	
	// Get the tab number and remove the 'a', 'b' or 'c'.
	tabnum = tabnum.substring(0, tabnum.length - 1);
	// Change the background images.
	ela = document.getElementById(tabnum + "a");
	ela.className = "tab-blue-left";
	elb = document.getElementById(tabnum + "b");
	elb.className = "tab-blue";
	elc = document.getElementById(tabnum + "c");
	elc.className = "tab-blue-right";
}
function changeTabBack(tabnum, protocol) {
	// Get the tab number and remove the 'a', 'b' or 'c'.
	tabnum = tabnum.substring(0, tabnum.length - 1);
	// Change the background images.
	ela = document.getElementById(tabnum + "a");
	ela.className = "tab-grey-left";
	elb = document.getElementById(tabnum + "b");
	elb.className = "tab-grey";
	elc = document.getElementById(tabnum + "c");
	elc.className = "tab-grey-right";
}
function changeSubTab(subtabnum, protocol) {
	// Get the tab number and remove the st and the 'a', 'b' or 'c'.
	subtabnum = subtabnum.substring(2, subtabnum.length - 1);
	// Change the background images
	sta = document.getElementById("st" + subtabnum + "a");
	stb = document.getElementById("st" + subtabnum + "b");
	stc = document.getElementById("st" + subtabnum + "c");
	// Set the background and stop any repeats on the X or Y plane.
	sta.style.background = "url(/novatech/_images/subsubnav-pink-left.png)";
	sta.style.backgroundRepeat = "no-repeat";
	// Set the background and repeat the x plane.
	stb.style.background = "url(/novatech/_images/subsubnav-pink.png)";
	stb.style.backgroundRepeat = "repeat-x";
	// Set the background and stop any repeats on the X or Y plane.
	stc.style.background = "url(/novatech/_images/subsubnav-pink-right.png)";
	stc.style.backgroundRepeat = "no-repeat";
}
function changeSubTabBack(subtabnum, protocol) {
	// Get the tab number and remove the st and the 'a', 'b' or 'c'.
	subtabnum = subtabnum.substring(2, subtabnum.length - 1);
	// Change the background images.
	sta = document.getElementById("st" + subtabnum + "a");
	stb = document.getElementById("st" + subtabnum + "b");
	stc = document.getElementById("st" + subtabnum + "c");
	// Set the background to nothing.
	sta.style.background = "";
	stb.style.background = "";
	stc.style.background = "";
}
//KEVS LEFT MENU BIT
var lastClicked = "";
function sideMenuClick(id, url) {
	window.location = url;
}
function showHideDivs(parent) {
	var arrElements = ("div" == "*" && document.all) ? document.all : document.getElementsByTagName("div");
	var i = 0;
	var oElement;
	var level = parent.id;
	level = level.replace("mnu", "");
	var myArray = level.split("-");
	var level1 = myArray[0];
	var level2 = myArray[1];
	var level3 = myArray[2];
	var count = 0;
	lastClicked = parent.id;
	for (var i = 0; i < arrElements.length; i++) {
		oElement = arrElements[i];
		if (oElement.id != null) {
			if (oElement.id.substring(0, 3) == "mnu") {
				if (oElement.className == "kNavTopSelected") {
					oElement.className = "kNavTop";
				}
				if (oElement.className == "kNavMiddleSelected") {
					oElement.className = "kNavMiddle";
				}
				if (oElement.className == "kNavTop") {
					oElement.style.backgroundColor = "#ffffff";
					oElement.style.color = "#000000";
				}
				if (oElement.className == "kNavMiddle") {
					oElement.style.backgroundColor = "#dddddd";
					oElement.style.color = "#000000";
				}
			}
		}
	}
	document.getElementById("mnu" + level1 + "-0-0").className = "kNavTopSelected";
	document.getElementById("mnu" + level1 + "-0-0").style.backgroundColor = "#333333";
	document.getElementById("mnu" + level1 + "-0-0").style.color = "#ffffff";
	if (level3 == "0") {
		if (level2 != "0") {
			document.getElementById("mnu" + level1 + "-" + level2 + "-0").className = "kNavMiddleSelected";
			document.getElementById("mnu" + level1 + "-" + level2 + "-0").style.backgroundColor = "#999999";
			document.getElementById("mnu" + level1 + "-" + level2 + "-0").style.color = "#ffffff";
		}
	}
}