// JavaScript Document

<!--
var W3CDOM = (document.getElementsByTagName && document.createElement);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function validate_form(field) {
  validForm = true;	
  firstError = null;
  var x = field.elements;
  for (var i=0; i<x.length;i++) {
	  if ((!x[i].value) && (x[i].name != "message")) writeError(x[i],"This field is required.");
	  if (x[i].name == "email" && x[i].value ) if (!validate_email(x[i].value)) writeError(x[i], "Not recognized as a valid email.");
	  // if (x[i].name != "email" && x[i].value ) if (!validate_text(x[i].value)) writeError(x[i], "Do not use the special characters: <,>,&");
  }
  if (!validForm) return false;
  return true;
  }
  
  function writeError(obj,message) {
	validForm = false;
	if (obj.hasError) return;
	if (W3CDOM) {
		obj.className += ' error';
		obj.onchange = removeError;
		var sp = document.createElement('span');
		sp.className = 'error';
		sp.id = 'attention';
		sp.appendChild(document.createTextNode(message));
		obj.parentNode.appendChild(sp);
		obj.hasError = sp;
	}
	else {
		errorstring += obj.name + ': ' + message + '\n';
		obj.hasError = true;
	}
	if (!firstError)
		firstError = obj;
}

function removeError() {
	this.className = this.className.substring(0,this.className.lastIndexOf(' '));
	this.parentNode.removeChild(this.hasError);
	this.hasError = null;
	this.onchange = null;
}

function validate_email(x) {
	regex=/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
	return regex.test(x);
}
//-->



<!--//--><![CDATA[//><!--
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		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", "");
				}
			}
		}
	}
}
window.onload=startList;

//--><!]]>

