function validatesurveyform() {
	
	var radioValOne = valRadiobutton(document.surveyform.decision);
	if (radioValOne == '') {
		alert("Please select the product attribute that was most important in your decision to purchase this product.");
		return false;
	}
	if (radioValOne == 'd') {
		if (!validRequired(document.surveyform.decision_other,"","Please explain the product attribute that was most important in your decision to purchase this product.")) {
		return false;
		}
		if (document.surveyform.decision_other.value.length > 100) {
			alert("Please limit your response to 100 or less characters. You have entered in " + document.surveyform.decision_other.value.length + " characters.");
			document.surveyform.decision_other.focus();
			return false;
		}
	}

	
	if (document.surveyform.age1.value == "" && document.surveyform.age2.value == "" && document.surveyform.age3.value == "" && document.surveyform.age4.value == "" && document.surveyform.age5.value == "") {
		alert("How old is the child or children for whom you purchased this product?");
		document.surveyform.age1.focus();
		return false;
	}
	
	if (document.surveyform.age1.value != "" && isNaN(document.surveyform.age1.value)) {
		alert("Please only enter in numbers for the child's age");
		document.surveyform.age1.focus();
		return false;
	}
	
	if (document.surveyform.age2.value != "" && isNaN(document.surveyform.age2.value)) {
		alert("Please only enter in numbers for the child's age");
		document.surveyform.age2.focus();
		return false;
	}
	
	if (document.surveyform.age3.value != "" && isNaN(document.surveyform.age3.value)) {
		alert("Please only enter in numbers for the child's age");
		document.surveyform.age3.focus();
		return false;
	}
	
	if (document.surveyform.age4.value != "" && isNaN(document.surveyform.age4.value)) {
		alert("Please only enter in numbers for the child's age");
		document.surveyform.age4.focus();
		return false;
	}
	
	if (document.surveyform.age5.value != "" && isNaN(document.surveyform.age5.value)) {
		alert("Please only enter in numbers for the child's age");
		document.surveyform.age5.focus();
		return false;
	}
	
	if (document.surveyform.age1.value != "" && isNaN(document.surveyform.age1.value)) {
		alert("Please only enter in numbers for the child's age");
		document.surveyform.age1.focus();
		return false;
	}
	
	var radioValTwo = valRadiobutton(document.surveyform.satisfaction);
	if (radioValTwo == '') {
		alert("Please indicate your level of satisfaction related to the product.");
		return false;
	}
	if (radioValTwo == 'd') {
		if (!validRequired(document.surveyform.notsatisfied,"","Please explain why you are not satisified with the product.")) {
		return false;
		}
		if (document.surveyform.notsatisfied.value.length > 100) {
			alert("Please limit your response to 100 or less characters. You have entered in " + document.surveyform.notsatisfied.value.length + " characters.");
			document.surveyform.notsatisfied.focus();
			return false;
		}
	}
	
	
	if (!validRequired(document.surveyform.improvements,"","Please explain how you think we can do to make this product better.")) {
	return false;
	}
	if (document.surveyform.improvements.value.length > 100) {
		alert("Please limit your response to 100 or less characters. You have entered in " + document.surveyform.improvements.value.length + " characters.");
		document.surveyform.improvements.focus();
		return false;
	}
	
	
	var radioValThree = valRadiobutton(document.surveyform.products);
	if (radioValThree == '') {
		alert("Please select what type of product would most interest you if JCPenney were to sell additional Danger Rangers product as part of the JCPenney Afterschool Fund campaign.");
		return false;
	}
	if (radioValThree == 'e') {
		if (!validRequired(document.surveyform.products_other,"","Please explain what type of product would most interest you if JCPenney were to sell additional Danger Rangers product as part of the JCPenney Afterschool Fund campaign.")) {
		return false;
		}
		if (document.surveyform.products_other.value.length > 100) {
			alert("Please limit your response to 100 or less characters. You have entered in " + document.surveyform.products_other.value.length + " characters.");
			document.surveyform.products_other.focus();
			return false;
		}
	}

	var radioValFour = valRadiobutton(document.surveyform.hear);
	if (radioValFour == '') {
		alert("Please indicate how you heard about the Danger Rangers product in JCPenney.");
		return false;
	}
	var radioValFive = valRadiobutton(document.surveyform.reason);
	if (radioValFive == '') {
		alert("Please indicate which was the most important reason you purchased this product.");
		return false;
	}

	
	if (!validRequired(document.surveyform.security_code,"","Please enter the code you see in the image into the security field.")) {
	return false;
	}
	
	return true;
	
}

function check() {
    if (validatesurveyform()) {
        document.surveyform.submit();
	}
}