var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
function checkmail(e) {
	var returnval=emailfilter.test(e.value);
	if (returnval==false){
		alert("Please enter a valid email address.");
		e.select();
	}
	return returnval;
}

$('emaillist').addEvent('submit', function(e) {
	new Event(e).stop();
	$$('.send').set('value','sending...');
	new Request({
		url: this.action,
		data: this,
		method: this.method ? this.method : 'post',
		onComplete: function(response) { 
			$$('.thanks').adopt(new Element('div',{ 'text':"All set! Talk soon."}));
			$$('.thanks').removeClass('hidden');
			$('emaillist').addClass('hidden');
		}
	}).send();
});
