// JavaScript Document
// FORM HIGHLIGHT ON FOCUS
function trColor(elementId) {
	if (document.getElementById) {
		document.getElementById(elementId).style.backgroundColor="#eeeeee"
	}
}
function trColorOff(elementId) {
	if (document.getElementById) {
		document.getElementById(elementId).style.backgroundColor="#f8f8f8"
	}
}
function validateEmail(value){
	//Function to validate email addresses. Run a Regex validation against the value. If valid iIsValid is true return 0 and hide the error field, if not iIsValid is false, the field is highlighted as in error and a validation message is set
	var emailRegex = /^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/;
	if(emailRegex.test(value)){
		iIsValid = true;
	}else{
		iIsValid = false;
	}
	return iIsValid;
}