function contestValidate(formElem) {
	var inputElem = null;
	var why = '';
	
	inputElem = formElem.Name;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your Name\n";
		}
	}
	
	inputElem = formElem.Email;
	if( inputElem ) {
		if(!isValidEmail(inputElem.value)) {
			why += " * Your Email Address\n";
		}
	}
	
	inputElem = formElem.Address;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your Street Address\n";
		}
	}
	
	inputElem = formElem.City;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your City\n";
		}
	}
	
	inputElem = formElem.State;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your State\n";
		}
	}
	
	inputElem = formElem.ZipCode;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your Zip Code\n";
		}
	}

	inputElem = formElem.captcha;
	if (inputElem) {
		if (inputElem.value.length != 8) {
			why += " * Security Code\n";
		}
	}
	
	if( why != "" ) {
		why = "There is an error with your request.\nPlease fill out the following required fields:\n" + why;
		alert(why);
		return false;
	}
	else {
		return true;
	}
}

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function isValidEmail(the_email) {
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\'\>\,\;\:\\\/\"\[\]]/;
	the_email=trim(the_email);
	if (!emailFilter.test(the_email) || the_email.match(illegalChars)) {
		return false;
	}
	return true;
}