
try {
  //document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

/* Calls searchForLIs for both menu's. This replaces the csshover.htc
   functionality in the menu's */

function parseLists() {
	if (document.all&&document.getElementById) {
		menuRoot = document.getElementById("main_menu");
		searchForLIs(menuRoot);
 	} 	
}

/* Recursive function. Searches the childs of the passed object for LI's or UL's. 
   When found they are passed to this function again. LI's are also given 2 events (mouseover / mouseout). */

function searchForLIs(objectReference) {
	for (var i=0; i < objectReference.childNodes.length; i++) {
		node = objectReference.childNodes[i];
		switch (node.nodeName) {
			case "LI": {
				node.onmouseover = function() {
					this.className += " over";
  				}
  				node.onmouseout = function() {
  					this.className = this.className.replace(" over", "");
   				}				
				searchForLIs(node);	
				break;
			}
			case "UL": {
				searchForLIs(node);
				break;
			}		
		}
	}
	return;
}

//window.onresize = setTdHeight;
document.onactivate = parseLists;