setTopNav = function() {
if (document.all&&document.getElementById) {
	navRoot = document.getElementById("topNav");
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {node.onmouseover=function() {
			this.className+="over";
		}
		node.onmouseout=function() {
  			this.className=this.className.replace("over", "");
  	 	}
   	}

  }
 
 }
}
function init() {
	if (document.getElementById("topnav")) {
		setTopNav();		
	}
	
}
window.onload=init;


function checkEmail(form, btn) {
	if (btn==form.subscribe) {
		form.formaction.value="subscribe"
	} else {
		form.formaction.value="unsubscribe"
	}
	if (form.email.value=='' || !isValidEmail(form.email.value)) {
		alert('Please enter a valid email address');
		form.email.focus();
		return false;
	}
	return true;
}

function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}


function showWin(movVersion){
	alert(movVersion);
	var vidWin = document.getElementById("videoWin")
	vidWin.style.visibility="visible";
	showProps(vidWin);
}

//for What is Wellness wheel
function show(divname) {
	if (document.getElementById) {
		var obj=document.getElementById('definition')	
		var def=document.getElementById(divname).innerHTML
	} else if (document.all){
		var obj=document.all('definition')	
		var def=document.all(divname).innerHTML
	}
	obj.innerHTML=def
}




function showProps(obj,objName) {
	var result=""
	var count=0
for (var i in obj) {
	result+=objName+"."+i+"="+obj[i]+"\n"
	count++
	if (count==25) {
		alert(result)
		result=""
		count=0
		}
	}
	alert(result)
}
