// JavaScript Document

// Validate email address
function emailAddressIsValid(str){
	var emailAddressFormat = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,3}$/;
	if (!(emailAddressFormat.test(str))){
		return false;
	}
	return true;
}
// Trim leading and trailing spaces
function Trim(strToTrim) {
	while(strToTrim.charAt(0)==' '){strToTrim = strToTrim.substring(1,strToTrim.length);}
	while(strToTrim.charAt(strToTrim.length-1)==' '){strToTrim = strToTrim.substring(0,strToTrim.length-1);}
	return strToTrim;
}

		function CheckLogin(frm){
			if (Trim(frm.subscriber.value) == ""){alert("Please enter Email.");frm.subscriber.focus();return false;}
			if (!emailAddressIsValid(Trim(frm.subscriber.value))) {alert("Please enter a valid Email.");frm.subscriber.focus();return false;}
			return true;
		}
