function emailcheck(f) {
	if (f.email.value.search(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i)==-1) {
		alert('Please enter a valid email address.');
		return false;
	}
	return true;
}

function newsletterSignup(f) {
	var eok = emailcheck(f);
	if (eok) {
		pageTracker._trackPageview('/newsletter/complete/');
		return true;
	}
	return false;
}

var cliprate;
window.addEvent('domready', function() {
	if ($chk($('cliprating'))) {
		var rateopts = $('cliprating').get('alt').split('|');
		cliprate = new sfRatings($('cliprating'), $$('#cliprating a'), { rating: rateopts[1], id: rateopts[0] });
	}
	
	if ($('footer_email').get('value')=='') $('footer_email').set('value', 'enter your email');
	$('footer_email').addEvent('blur', function() {
		if (this.get('value')=='') this.set('value', 'enter your email');
	});
	$('footer_email').addEvent('focus', function() {
		if (this.get('value')=='enter your email') this.set('value', '');
	});
});