/* author: Linden Hatherall */

// email address
reExpEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/

function mail(){
	if(validateEmail(document.subscribe.email.value)){
		return confirm("Subscribe email address: "+document.subscribe.email.value);		
	}else{
		alert("the email address you provided does not appear to be valid.\n\nplease check and try again.");
		return false;
	}
}

// validate email address
function validateEmail(i1){		
	if (reExpEmail.test(i1)){
		return true ;	
	}else{
		return false;
	}		
}

