
// quickie - check email entry
// Last updated:  12.7.08

// -------------------
// TYPE 1
// -------------------
function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}
function checkform()
{
	if(document.happeningsFrm.email.value == '' || document.happeningsFrm.email.value == "Enter Email Address") {
		//alert('* Enter your Email into the 1st box *');
	  alert('* Please enter your email address *');
		document.happeningsFrm.email.focus();
		return false;
	}
	
	return true;

return false;

}

// -------------------
// TYPE 2
// -------------------
function validate(Email) {
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var address = document.formH.elements[Email].value;
	if(document.formH.Email.value=='') {
		alert('* Enter your Email Address *');
		document.formH.Email.focus();
		return false;
	}
	else {
		if(reg.test(address) == false) {
			alert('* You have entered an invalid Email Address *');
			document.formH.Email.focus();
			return false;
		}
		else {
			return true;
		}
	}
}