
var delay_hide=500
var tTabActive;
function startList(tabActive, linkActive) {
	//tabActive = "findtab"; linkActive = "mapsearch";
	//tabActive = ""; linkActive = "";
	gTabActive = tabActive;
	clear_delayhide();
	tabsRoot = document.getElementById("tabs");

	if (document.all && document.getElementById || tabActive!="") { //IE
		for (i=0; i<tabsRoot.childNodes.length; i++) {
		  node = tabsRoot.childNodes[i];
  			if (node.nodeName=="LI") {
			if (node.id==tabActive){
				node.className="selected"
				linksRoot = node.getElementsByTagName("A");			
				for(e=0;e<linksRoot.length;e++){if(linksRoot[e].id==linkActive){linksRoot[e].className="on"}}
			}
  			node.onmouseover = function() 
				{ this.className+=" over on"; 
					if(this.id!=tabActive&&tabActive){document.getElementById(tabActive).className="off"; clear_delayhide();} }
  			node.onmouseout = function() 
				{ this.className=this.className.replace(" over on", ""); 
					if(this.id!=tabActive&&tabActive){ delayhide=setTimeout("showit()",delay_hide) };
					 }
		   }
			if(tabsRoot.childNodes.length==i+1 && tabsRoot.id=="tabs"){
				tabsRoot = document.getElementById("subTabs"); i=-1;
		   }
	    }
	}
}


function showit() {
	clear_delayhide();
	if(document.getElementById(gTabActive)){
		document.getElementById(gTabActive).className="selected";
	}
}

function clear_delayhide(){
	if (window.delayhide){

		clearTimeout(delayhide)
	}
}
