var secondaryNav = {
		rolloverTimeOut : "",
		branch: "",
		xx : function() {
			if (document.getElementById("secnavmenu")){
				var dniNavElements = document.getElementById("secnavmenu").childNodes;
				for (var i=0; i<dniNavElements.length; i++){
					var liNode = dniNavElements[i];
					if (liNode.nodeName.toLowerCase()=="li") {
						if (liNode.className!="nav-first") {
							
							liNode.onmouseover=function(){
									secondaryNav.menuShow(this);
								}
							liNode.onmouseout=function(){
									secondaryNav.menuHide(this);
								}
							for (j=0;j<liNode.childNodes.length;j++) {
								subNode = liNode.childNodes[j];
								if (subNode.nodeName=="UL") {
									subNode.onmouseover=function() {
				                        secondaryNav.keepSecLinks(this);
				                    }
				                    subNode.onmouseout=function() {
				                        secondaryNav.toggleSecLinksOff(this);
				                    }

								}
							}
						}
					}
				}
			}
		},
		menuShow:function(ele) {
			clearTimeout(secondaryNav.rolloverTimeOut);
			secondaryNav.branch = ele.getElementsByTagName("ul")[0];
			secondaryNav.branch.className+=" sec-nav-sub-show";
		},
		menuHide:function(ele) {
			secondaryNav.rolloverTimeOut = setTimeout(function(){
				secondaryNav.branch.className=secondaryNav.branch.className.replace(/ ?sec-nav-sub-show/g,'');
		    },800);
		},
		toggleSecLinksOff : function(obj)  {
			secondaryNav.rolloverTimeOut = setTimeout(function(){
				secondaryNav.branch.className=secondaryNav.branch.className.replace(/ ?sec-nav-sub-show/g,'');
		    },800);
		},

		keepSecLinks :function(obj)  {
		    clearTimeout(secondaryNav.rolloverTimeOut);
		    
		},
		init : function(){
			var self = this;
			var func = window.onload;
			window.onload = function(){
				if (func) func();
				self.activate();
			}
		},
		activate: function(){
			var e;
			if ((e = document.getElementById("sec-nav-options"))) {
				var fsNavElements = e.getElementsByTagName("li");
				for (var i=0; i<fsNavElements.length; i++){
					fsNavElements[i].onmouseover=function(){
						this.className+=" sec-nav-sub-show";
						}
						fsNavElements[i].onmouseout=function(){
							this.className=this.className.replace(/ ?sec-nav-sub-show/g,'');
						}
					}
			}
		}

		

}
