
function initNavigation() {
	if (document.getElementById) { // Does the browser support the getElementById method?
		navRoot = document.getElementById("nav_list"); // Get main list ul

		if (typeof defaultMainList!="undefined")
			var reMainNav = new RegExp("^" + defaultMainList + "<", "i"); // Regex for finding the index of the default main list item

		for (i=0; i<navRoot.childNodes.length; i++) { // Loop over main list items
			node = navRoot.childNodes[i];
			if (node.nodeName == "LI") {
				if ((typeof defaultMainList!="undefined") && node.firstChild.innerHTML.match(reMainNav)) { // Found default main nav item
					defaultMainListIndex = i;
				} else {

					////// Apply onmouseover and onmouseout event handlers to each main list item //////
					node.onmouseover = function() {
						if (defaultMainListIndex != -1) // Is there a default main list item?
							navRoot.childNodes[defaultMainListIndex].className = "nav_default_off"; // De-activate it
						this.className = "mouse_over"; // Activate the hovered item
					}
					node.onmouseout = function() {
						this.className = ""; // De-activate the hovered item
						if (defaultMainListIndex != -1) // Is there a default main list item?
							navRoot.childNodes[defaultMainListIndex].className = "nav_default_on"; // Activate it
					}
				}
			}
		}

		////// Activate the default main list item //////
		if (defaultMainListIndex != -1)
			navRoot.childNodes[defaultMainListIndex].className = "nav_default_on";

		////// If the search form has radio buttons, make them visible //////
		radioContainer = document.getElementById("radio_container");
		if (radioContainer) {
			//Comment the following line to always hide the radio buttons
			radioContainer.style.display = "inline";
		}
	}
}

function tp_over(node, default_tabpanel)
{
  default_tabpanel.className = ""; // De-activate default item
  node.className = "tabpanel_default"; // Activate the hovered item
  if (document.getElementById("tabpanel_1_sublist")) {
	  var panel_1_width = document.getElementById("tabpanel_1_sublist").offsetWidth; // Needed for IE
	  if (panel_1_width) {
    	if (document.getElementById("tabpanel_2_sublist"))
	      document.getElementById("tabpanel_2_sublist").style.width = (panel_1_width - 2) + "px"; // Needed for IE
    	if (document.getElementById("tabpanel_3_sublist"))
	      document.getElementById("tabpanel_3_sublist").style.width = (panel_1_width - 2) + "px"; // Needed for IE
    	if (document.getElementById("tabpanel_4_sublist"))
	      document.getElementById("tabpanel_4_sublist").style.width = (panel_1_width - 2) + "px"; // Needed for IE
    	if (document.getElementById("tabpanel_5_sublist"))
  		  document.getElementById("tabpanel_5_sublist").style.width = (panel_1_width - 2) + "px"; // Needed for IE
  	}
  }
}

function tp_out(node, default_tabpanel)
{
  node.className = ""; // De-activate this item
  default_tabpanel.className = "tabpanel_default"; // Activate default item
}

var defaultMainListIndex = -1; // Initialize the index of the default main list item
