function mainNav(){
	if(document.getElementById("homeMainNav")){
		var ulObj = document.getElementById("homeMainNav");
		var lisObj = ulObj.childNodes;
		for(i=0; i<lisObj.length;i++){
			if(lisObj[i].tagName == "LI" && lisObj[i].getAttribute("id")!="mn1"){
				lisObj[i].onmouseover = function(){
					this.className = "on";
					if(this.getElementsByTagName("UL").length >0){
						this.getElementsByTagName("UL")[0].style.display = "block";
					}
				}
				lisObj[i].onmouseout = function(){
					if(this.getElementsByTagName("UL").length >0){
						this.getElementsByTagName("UL")[0].style.display = "none";
					}
					this.className = "";
				}
			}
		}
	}
	
}
function mainNavB(){
	if(document.getElementById("MainNav")){
		var ulObj = document.getElementById("MainNav");
		var lisObj = ulObj.childNodes;
		for(i=0; i<lisObj.length;i++){
			if(lisObj[i].tagName == "LI" && lisObj[i].getAttribute("id")!="mn1"){
				lisObj[i].onmouseover = function(){
					this.className = "on";
					//alert("d");
					if(this.getElementsByTagName("UL").length >0){
						this.getElementsByTagName("UL")[0].style.display = "block";
					}
					
				}
				lisObj[i].onmouseout = function(){
					if(this.getElementsByTagName("UL").length >0){
						this.getElementsByTagName("UL")[0].style.display = "none";
					}
					this.className = "";
				}
			}
		}
	}
}
/*
function slideDown(tarObj){
	var _height = tarObj.clientHeight;
	tarObj.style.height = "0px";
	tarObj.style.overflow = "hidden";
	tarObj.style.visibility = "visible";
	tarObj.style.padding = "0px";
	tarObj.style.border = "none";
	changeHeight(tarObj,_height);
}

function changeHeight(tarObj,tarHeight){
	//alert(tarObj.parentNode._id);
	var timeoutId = tarObj.parentNode._id;
	if(parseInt(tarObj.style.height) >= tarHeight){
		//clearTimeout(timeoutId);
		tarObj.style.height = tarHeight + "px";
		tarObj.style.overflow = "hidden";
		tarObj.style.visibility = "visible";
		tarObj.style.padding = "2px";
		tarObj.style.border = "1px solid #000";
	}else{
		var add = parseInt(tarObj.style.height) + 1 + "px";
		tarObj.style.height = add;
	}
	var timeoutId = setTimeout(function(){changeHeight(tarObj,tarHeight)},1);
}*/

if(window.attachEvent){
window.attachEvent("onload",mainNav);
window.attachEvent("onload",mainNavB);
}else if(window.addEventListener){
window.addEventListener("load",mainNav,false);
window.addEventListener("load",mainNavB,false);
}
