function valSignUpForm(f) {
	if ((!emailIsValid(f.subEmail.value))) {
		alert('Please enter a valid e-mail address to sign up for updates.');
		f.subEmail.focus();
		return false;
	}
	return true;
}
function emailIsValid(e) {
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(e)) return true;
	else return false;
}

function displayUserMessages() {
	um = document.getElementById("user_messages");
	um.onclick = function () {
		fadeElement(um,10,100);
	}
	setTimeout('fadeElement(um,10,100);', 15000);
}
function displayUserWarnings() {
	um = document.getElementById("user_warnings");
	um.onclick = function () {
		fadeElement(um,10,100);
	}
	setTimeout('fadeElement(um,10,100);', 15000);
}
function displayUserErrors() {
	um = document.getElementById("user_errors");
	um.onclick = function () {
		fadeElement(um,10,100);
	}
	setTimeout('fadeElement(um,10,100);', 15000);
}
function fadeElement(el, step, msecs) {
	var to = 0;
	if (navigator.appName.indexOf("Netscape")!=-1&&parseInt(navigator.appVersion)>=5) {
		if(parseInt(document.getElementById(el.id).style.MozOpacity) == 0) return;
		step = step/100;
		step = parseInt(step * 100)/100;
		for(i = 1; i > 0; i = parseInt((i - step)*100)/100) {
			to = to + msecs;
			self.setTimeout('document.getElementById("' + el.id + '").style.MozOpacity = ' + i + ';',to);
		}
		to = to + msecs;
		self.setTimeout('document.getElementById("' + el.id + '").style.display = "none";',to);
	} else if (navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4) {
		if(el.filters.alpha.opacity == 0) { return; }
		for(i = 100; i > 0; i = parseInt((i - step)*100)/100) {
			to = to + msecs;
			setTimeout('document.getElementById("' + el.id + '").filters.alpha.opacity = ' + i + ';',to);
		}
		to = to + msecs;
		self.setTimeout('document.getElementById("' + el.id + '").style.display = "none";',to);
	}
}