/*window.onload = function() {
	var screenSize = screen.width || 1024;
	if (screenSize < 1024) {
		var container = document.getElementById("container");
		var compBanner = document.getElementById("competitionBanner");
		if (container) container.style.width = "770px";
		if (compBanner)compBanner.style.background = "background:#80aedd url(/images/bg/bgCompetitionSm.jpg) no-repeat left top";
	}
}*/

function validateForm() {
	
	var theForm = document.contactForm;
	var errors = [];
	if(theForm.name.value == "") {
		errors.push("Name is empty.");
	}
	if(theForm.organization.value == "") {
		errors.push("Organization is empty.");
	}
	if(theForm.address1.value == "") {
		errors.push("Street Address is empty.");
	}
	if(theForm.city.value == "") {
		errors.push("City is empty.");
	}
	if(theForm.state.value == "") {
		errors.push("State/Province is empty.");
	}
	if(theForm.email.value == "") {
		errors.push("Email Address is empty.");
	}
	
	if(theForm.email.value != "") {
		if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.email.value)) {
			errors.push("Invalid Email Address");
		}
	}

	if(errors.length) {
		var errorMsg = "Please correct the following errors:\n\n" + errors.join("\n");
		alert(errorMsg);
		return false;
	} else {
		return true;
	}

}