function topnav(){
	var list = document.getElementById("topnav").getElementsByTagName("li");
	var URL = window.location.href;
	//special case
	if(URL.indexOf("mortgage-leads.html") != -1){
		var thisTab = "overview";
	}
	for(var i=0; i<list.length; i++){
		var a = list[i].getElementsByTagName("a");
		a = a[0];
		if(URL.indexOf(a.href) != -1 || a.href.toLowerCase().indexOf(thisTab) != -1){
			a.removeAttribute("href");
			a.className = "curr";
			list[i].className = "curr";			
		}
		else{
			list[i].onmouseover = function(){
				this.className = "over";
				tA = this.getElementsByTagName("a");
				tA = tA[0];
				tA.className = "over";
			}
			list[i].onmouseout = function(){
				this.className = "out";
				tA = this.getElementsByTagName("a");
				tA = tA[0];
				tA.className = "";				
			}
		}
	}
}


window.onload = topnav;

