var navTimer;
/* ################ Top Nav ################ */
function topmenuClear() {
	var navRoot = document.getElementById("topmenu");
		for (var i=0; i<navRoot.childNodes.length; i++) {
			var node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.className=node.className.replace("over", "");
				node.childNodes[0].className="";
			}
		}
}
function topmenuHover() {
	if(document.getElementById("topmenu")) {
		var navRoot = document.getElementById("topmenu");
		for (var i=0; i<navRoot.childNodes.length; i++) {
			var node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					clearTimeout(navTimer); topmenuClear();
					this.className+=" over";
					this.childNodes[0].className="over"; 
				};
				node.onmouseout=function() {
					navTimer = setTimeout(topmenuClear,800);
				};
			}
		}
	}
}
/* ################ End Top Nav ################ */

/* ################ Loader ################ */
 $(document).ready(function(){
 	/*setupTabs();   
	externalLinks();
	welcomeMessage();
	drawTV();*/
	$("#topmenu > li").hover(
		function(){ clearTimeout(navTimer); topmenuClear();  $(this).addClass("over");  $(this).find(":first").addClass("over"); },
		function(){  navTimer = setTimeout(topmenuClear,800); }
	);
	$(".menuBox  a  img").mouseover(function(){
		var tSrc = $(this).attr('src');
		var tCls = $(this).attr('class');
		if(tCls!='current'){
			$(this).attr('src', tSrc.replace('.gif', '_on.gif')); 
		}
	});
	$(".menuBox  a  img").mouseout(function(){
		var tCls = $(this).attr('class');
		if(tCls!='current'){
			var tSrc = $(this).attr('src');$(this).attr('src', tSrc.replace('_on.gif', '.gif')); 
		}
	});
	if ('function' === typeof TabPanel){

		TabPanel('pnlSwitch1','01','_over','_on');
	};

 });
