function validate() {
	var frm = document.getElementById('signUpForm');
	var isValid = true;
	var errorColor = "#f0a0a0";
	var validColor = "#ffffff";
	var el;
	var r;
	
	el = document.getElementById('userName');
	if (el) {
		if (el.value == "") {
			isValid = false;
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	el = document.getElementById('email');
	if (el) {
		el.value = el.value.replace(/^\s+|\s+$/g, "");
		r = /^[0-9a-z\-\._]+@[0-9a-z\-\._]+\.[a-z]+$/i;
		if (!r.test(el.value)) {
			isValid = false;
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	el = document.getElementById('ccName');
	if (el) {
		if (el.value == "") {
			isValid = false
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	el = document.getElementById('cc');
	if (el) {
		el.value = el.value.replace(/[^0-9]/g, "");
		if (el.value == "") {
			isValid = false
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	if (document.getElementById('expMonth') && document.getElementById('expYear')) {
		var expmonth = document.getElementById('expMonth').options[document.getElementById('expMonth').selectedIndex].value;
		var expyear = document.getElementById('expYear').options[document.getElementById('expYear').selectedIndex].value;
		var now = new Date();
		
		if (Number(expyear) == now.getFullYear() && Number(expmonth) < now.getMonth()) {
			isValid = false;
			document.getElementById('expMonth').style.backgroundColor = errorColor;
			document.getElementById('expYear').style.backgroundColor = errorColor;
		}
		else {
			document.getElementById('expMonth').style.backgroundColor = validColor;
			document.getElementById('expYear').style.backgroundColor = validColor;
		}
	}
	
	el = document.getElementById('address');
	if (el) {
		if (el.value == "") {
			isValid = false;
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	el = document.getElementById('city');
	if (el) {
		if (el.value == "") {
			isValid = false;
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	el = document.getElementById('state');
	if (el) {
		if (el.value == "") {
			isValid = false;
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	el = document.getElementById('zip');
	if (el) {
		if (el.value == "") {
			isValid = false;
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	
	el = document.getElementById('country');
	if (el) {
		if (el.value == "") {
			isValid = false;
			el.style.backgroundColor = errorColor;
		}
		else
			el.style.backgroundColor = validColor;
	}
	

	if (isValid)
		frm.submit();
	else
		alert("There was a problem with your sign-up form.  Please review the highlighted fields before continuing.");
}