
function page_load() {
	
	for (var i = 0; i < load_funcs.length; i++) {
		cmd = load_funcs[i] + "()";
		eval(cmd);
	}
}

//-----------------------------------------------------------
//Form Input Behaviors

//used on search input to clear default value
//fired with onFocus - input tag - only clear default value
function clearFormInputText(thefield){
if (thefield.defaultValue==thefield.value)
	thefield.value = "";
}

//fired with onBlur - input tag - when blank
function setFormInputText(thefield){
if (thefield.value=='')
	thefield.value = thefield.defaultValue;
}

//fired with onSubmit - form tag - when defaultValue is same as value supplied
function checkSubmitFormInputText(theform,inputname){
//var inputnamed = inputname.defaultValue;
//alert(inputnamed);
if (inputname.defaultValue==inputname.value)
	inputname.value = "";
}

function validateEmail(inputname) {
alert("add email validation:  "+inputname+": value: "+inputname.value);
}

function verifyEmail(){
     var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
     if (document.enews_signup.enews_address.value.search(emailRegEx) == -1) {
          alert("Please enter a valid email address.");
          return false;
     }
//for double entry check
//     else if (document.enews_signup.enews_address.value != document.enews_signup.enews_address2.value) {
//          alert("Email addresses do not match.  Please retype them to make sure they are the same.");
//          return false;
//     }
     else {
//          alert("The email address is in the correct format and they are the same.");
          return true;
     }
}