
validateEmailForm = function(theForm){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var address = theForm.elements['email'].value;
	if(reg.test(address) == false) {
		alert('Invalid Email Address | Please Check the Email Address Entered and Try Again');
		return false;
	}
	var zip = theForm.elements['zip'].value;
	var regZip = /^\d{5}([\-]\d{4})?$/;		
       	if(regZip.test(zip) == false) {
		alert('Invalid Zip Code | Please Check the Zip Code Entered and Try Again | Zip Codes Should Be in the Form NNNNN(-NNNN)');
		return false;
	}
}


goToState = function(theDrop){
	var oDrop = document.getElementById(theDrop);
	if(oDrop){
		location.href = 'http://walmartcommunityvotes.com/state-basics?state=' + oDrop.value;
	}
}

filterNews = function(theDrop){
	var oDrop = document.getElementById(theDrop);
	if(oDrop){
		location.href = 'http://www.walmartcommunityvotes.com/election-news?state=' + oDrop.value;
	}
}

