/* this script needs to have a error message for each error. this way the error messages will be conistent through out the site*/

function validateEmail(src) {
     //<!--
	var returnValue = 3;// 3 means there is no value in the field
    if(src.value.length > 0){
        returnValue = returnValue - 2; // value is now 1, which means there is a value, but it aint good email!
	    if(test(src.value) == true){
	        returnValue = returnValue - 1;// value is now 0, which means it passed.
        }
	}
	return returnValue;
     //-->
  }
function test(src) {
     var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
     var regex = new RegExp(emailReg);
     return regex.test(src);
  }

