

// IE6's Image Flicker Fix
try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}



// Suckerfish CSS Timer Hack
var currentElement = false;		// contains the object the mouse is over
var timer;						// must be declared. holds timer obj		
var timecount = 340;			// how long sub menus should stay up
function activateMenu(nav) {
	// start at root
	navRoot = document.getElementById(nav);
	//get the li tags from root
	linodes = navRoot.childNodes;
	// loop thru li tags
	for (i=0; i< linodes.length; i++) {
		if (linodes[i].nodeName=="LI"){
			// get li
			li = linodes[i];
			// is there a sub-munu in this li?
			if(li.getElementsByTagName("UL").length > 0){	
				li.onmouseover=function(){
					//we no longer want to wait...we'll do it manually below
					clearTimeout(timer);
					//if another list is open, close it with no delay
					if(currentElement){
						openList = currentElement.getElementsByTagName("UL")[0];
						openList.style.display = "none";
					}
					//get new sub-menu
					subNav = this.getElementsByTagName("UL")[0];
					//show new sub-menu
					subNav.style.display = "block";
					//store li the mouse that holds sub-menu
					currentElement = this;
					}
				//close sub-menu with a delay
				li.onmouseout = function(){
					//must store in a var cuz setTimeOut ruins the li's scope (this)
					subNav = this.getElementsByTagName("UL")[0];
					//hide the UL after timecount (time) has passed
					timer = setTimeout('subNav.style.display = "none"', timecount);
				}
			} 
		} 
	}	
}	
startlist = function(){
		/* passes the function and id of the top level UL */		
		activateMenu('mainnav'); 
		} 
/*window.onload = startlist;*/