/*  ONLOAD EVENT HANDLER  */

document.onloadStack = new Array();
function doOnloadStack() {
	for (var i=0; i< document.onloadStack.length; i++) {
		eval(document.onloadStack[i]);
	}
}
window.onload = doOnloadStack;



/*  DROP DOWN MENUS  */

startList = function() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("navigation");
		for (i = 0; i < navRoot.childNodes.length; i++) {
			if (navRoot.childNodes[i].nodeName == "UL") {
				navRoot = navRoot.childNodes[i];
			}
		}
		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", "");
				}
			}
		}
	}
}
document.onloadStack.push('startList()');


function validate(form) {
	if (form.name == 'inquiries') {
		if (!form['email_name'].value) {
			alert("Please enter your name.");
			form.email_name.focus();
			return false;
		}
		if (!checkEmail(form.address.value)) {
			alert("Please enter a valid email address.");
			form.address.focus();
			return false;
		}
		if (!form.subj.value) {
			alert("Please enter a subject.");
			form.subj.focus();
			return false;
		}
		if (!form.msg.value) {
			alert("Please enter a message.");
			form.msg.focus();
			return false;
		}
	return true;
	}
	alert("invalid form: " + form.name);
	return false;
}
