function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function toggle(layer){
	jdiv = $(layer)
	jdiv.className = (jdiv.className == "olive hidden") ? jdiv.className = "olive shown" : jdiv.className = "olive hidden";
	var str = document.URL
	str = str.replace(/#top/,"")
	document.location = str+"#top"
	document.getElementById('demo_scheduler').focus()
}
function test(element){
	if (element != null){
		alert(element)
		//toggle(element.id)
	}
}
function toggle_kids(element){
	for (i=0; i<element.childNodes.length; i++){
			kid = element.childNodes[i];
			kid_kid = element.childNodes[i].childNodes[0];			
			kid.onclick = test(kid_kid);			
	}
}

function Validator(theForm){

a=Validator.arguments;
for(i=1; i<a.length; i++){
	if (theForm[Validator.arguments[i]].value == ""){
		alert("Please fill all required fields.");
		theForm[Validator.arguments[i]].focus();
		return (false);
	}
}

if (theForm.Name.value == ""){
	alert("Please enter a value for the \"Name\" field.");
	theForm.Name.focus();
	return (false);
}
if (theForm.Name.value.length < 2){
	alert("Please enter at least 2 characters in the \"Name\" field.");
	theForm.Name.focus();
	return (false);
}
if (theForm.Email.value.length < 2){
	alert("Please enter a valid value for the\"Email\" field.");
	theForm.Email.focus();
	return (false);
}

return (true);
}
