function valbutton(thisform) {
// place any other field validations that you require here

// child_name
if ((thisform.child_name.value.length == 0) ||
    (thisform.child_name.value == null)) {
    	alert("Please enter the child's name.");
    	thisform.child_name.focus();
    	return false;
}

// child_address
if ((thisform.child_address.value.length == 0) ||
    (thisform.child_address.value == null)) {
    	alert("Please enter the child's address.");
    	thisform.child_address.focus();
    	return false;
}

// child_city
if ((thisform.child_city.value.length == 0) ||
	(thisform.child_city.value == null)) {
    	alert("Please enter the child's city.");
    	thisform.child_city.focus();
    	return false;
}

// child_state
if ((thisform.child_state.value.length == 0) ||
	(thisform.child_state.value == null)) {
    	alert("Please enter the child's state.");
    	thisform.child_state.focus();
    	return false;
}

// child_zip
if ((thisform.child_zip.value.length == 0) ||
	(thisform.child_zip.value == null)) {
		alert("Please enter the child's ZIP code.");
    	thisform.child_zip.focus();
    	return false;
}

// child_date_of_birth
if ((thisform.child_date_of_birth.value.length == 0) ||
	(thisform.child_date_of_birth.value == null)) {
		alert("Please enter the child's date of birth.");
    	thisform.child_date_of_birth.focus();
    	return false;
}
  
validformat=/^\d{2}\/\d{2}\/\d{4}$/;

if (!validformat.test(child_date_of_birth.value)) {
		alert("Invalid date of birth format. Please correct and submit again.")
		thisform.child_date_of_birth.focus();
    	return false;

}

// child_age
if ((thisform.child_age.value.length == 0) ||
	(thisform.child_age.value == null)) {
    	alert("Please enter the child's age.");
    	thisform.child_age.focus();
    	return false;
}

// child_ethnicity
if ((thisform.child_ethnicity.value.length == 0) ||
	(thisform.child_ethnicity.value == null)) {
    	alert("Please enter the child's ethnicity.");
    	thisform.child_ethnicity.focus();
    	return false;
}

// child_gender
radiobutton_child_gender = -1;
for (i=0; i<thisform.child_gender.length; i++) {
	if (thisform.child_gender[i].checked) {
		radiobutton_child_gender = i;
}}

if (radiobutton_child_gender == -1) {
		alert("Please indicate the child's gender.");
		thisform.child_gender[0].focus();
		return false;
}

// child_legal_custodians
if ((thisform.child_legal_custodians.value.length == 0) ||
    (thisform.child_legal_custodians.value == null)) {
		alert("Please enter the child's legal custodian(s).");
    	thisform.child_legal_custodians.focus();
    	return false;
}

// services_sought
if ((thisform.services_sought_1.checked == false) &&
    (thisform.services_sought_2.checked == false) &&
    (thisform.services_sought_3.checked == false) &&
    (thisform.services_sought_4.checked == false) &&
    (thisform.services_sought_5.checked == false) &&
    (thisform.services_sought_6.checked == false) &&
    (thisform.services_sought_7.checked == false) &&
    (thisform.services_sought_8.checked == false) &&
    (thisform.services_sought_9.checked == false) &&
    (thisform.services_sought_10.checked == false) &&
	(thisform.services_sought_11.checked == false) &&
    (thisform.services_sought_12.checked == false)) {
		alert("Please indicate the service(s) being sought.");
		thisform.services_sought_1.focus();
		return false;
}
  
// seeking_assessment_other
if ((thisform.services_sought_12.checked == true &&
	 thisform.seeking_assessment_other.value.length == 0) ||
    (thisform.services_sought_12.checked == true &&
	 thisform.seeking_assessment_other.value == null)) {
        alert("Please enter the kind of assessment you are seeking.");
        thisform.seeking_assessment_other.focus();
        return false;
}

// insurance_status
if ((thisform.insurance_status_1.checked == false) &&
    (thisform.insurance_status_2.checked == false) &&
    (thisform.insurance_status_3.checked == false) &&
    (thisform.insurance_status_4.checked == false)) {
		alert("Please indicate the child's insurance status.");
		thisform.insurance_status_1.focus();
		return false;
}

// school_name
if ((thisform.school_name.value.length == 0) ||
    (thisform.school_name.value == null)) {
		alert("Please enter the school's name.");
    	thisform.school_name.focus();
    	return false;
}

// school_address
if ((thisform.school_address.value.length == 0) ||
    (thisform.school_address.value == null)) {
		alert("Please enter the school's address.");
    	thisform.school_address.focus();
    	return false;
}

// school_grade_placement
if ((thisform.school_grade_placement.value.length == 0) ||
    (thisform.school_grade_placement.value == null)) {
		alert("Please enter the child's grade placement.");
    	thisform.school_grade_placement.focus();
    	return false;
}

// school_teacher
if ((thisform.school_teacher.value.length == 0) ||
    (thisform.school_teacher.value == null)) {
		alert("Please enter the name of the child's teacher.");
    	thisform.school_teacher.focus();
    	return false;
}

// primary_caretaker_name
if ((thisform.primary_caretaker_name.value.length == 0) ||
    (thisform.primary_caretaker_name.value == null)) {
		alert("Please enter the name of the child's primary caretaker.");
    	thisform.primary_caretaker_name.focus();
    	return false;
}

// primary_caretaker_date_of_birth
if ((thisform.primary_caretaker_date_of_birth.value.length == 0) ||
	(thisform.primary_caretaker_date_of_birth.value == null)) {
		alert("Please enter the primary caretaker's date of birth.");
    	thisform.primary_caretaker_date_of_birth.focus();
    	return false;
}
  
validformat=/^\d{2}\/\d{2}\/\d{4}$/
if (!validformat.test(primary_caretaker_date_of_birth.value)) {
		alert("Invalid date of birth format. Please correct and submit again.")
		thisform.primary_caretaker_date_of_birth.focus();
    	return false;

}

// primary_caretaker_age
if ((thisform.primary_caretaker_age.value.length == 0) ||
	(thisform.primary_caretaker_age.value == null)) {
		alert("Please enter the primary caretaker's age.");
    	thisform.primary_caretaker_age.focus();
    	return false;
}

// primary_caretaker_address
if ((thisform.primary_caretaker_address.value.length == 0) ||
	(thisform.primary_caretaker_address.value == null)) {
		alert("Please enter the primary caretaker's address.");
    	thisform.primary_caretaker_address.focus();
    	return false;
}

// primary_caretaker_city
if ((thisform.primary_caretaker_city.value.length == 0) ||
	(thisform.primary_caretaker_city.value == null)) {
		alert("Please enter the primary caretaker's city.");
    	thisform.primary_caretaker_city.focus();
    	return false;
}

// primary_caretaker_state
if ((thisform.primary_caretaker_state.value.length == 0) ||
	(thisform.primary_caretaker_state.value == null)) {
		alert("Please enter the primary caretaker's state.");
    	thisform.primary_caretaker_state.focus();
    	return false;
}

// primary_caretaker_zip
if ((thisform.primary_caretaker_zip.value.length == 0) ||
	(thisform.primary_caretaker_zip.value == null)) {
		alert("Please enter the primary caretaker's ZIP code.");
    	thisform.primary_caretaker_zip.focus();
    	return false;
}

// primary_caretaker_phone
if (((thisform.primary_caretaker_phone_home.value.length == 0) || 
	 (thisform.primary_caretaker_phone_home.value == null)) &&
	((thisform.primary_caretaker_phone_work.value.length == 0) || 
	 (thisform.primary_caretaker_phone_work.value == null)) &&
	((thisform.primary_caretaker_phone_cell.value.length == 0) || 
	 (thisform.primary_caretaker_phone_cell.value == null))) {
		alert("Please provide us with at least one telephone number for the primary caretaker.");
		thisform.primary_caretaker_phone_home.focus();
		return false;
}

validformat=/^\(\d{3}\) \d{3}\-\d{4}$/;

if ((thisform.primary_caretaker_phone_home.value != 0) && 
	(!validformat.test(primary_caretaker_phone_home.value))) {
		alert("Invalid home phone number format. Please correct and submit again.")
		thisform.primary_caretaker_phone_home.focus();
    	return false;
}

if ((thisform.primary_caretaker_phone_work.value != 0) && 
	(!validformat.test(primary_caretaker_phone_work.value))) {
		alert("Invalid work phone number format. Please correct and submit again.")
		thisform.primary_caretaker_phone_work.focus();
    	return false;
}

if ((thisform.primary_caretaker_phone_cell.value != 0) && 
	(!validformat.test(primary_caretaker_phone_cell.value))) {
		alert("Invalid cell phone number format. Please correct and submit again.")
		thisform.primary_caretaker_phone_cell.focus();
    	return false;
}

// primary_caretaker_relationship_status
radiobutton_primary_caretaker_relationship_status = -1;
for (i=0; i<thisform.primary_caretaker_relationship_status.length; i++) {
	if (thisform.primary_caretaker_relationship_status[i].checked) {
		radiobutton_primary_caretaker_relationship_status = i;
}}

if (radiobutton_primary_caretaker_relationship_status == -1) {
		alert("Please indicate the relationship status of the primary caretaker.");
		thisform.primary_caretaker_relationship_status[0].focus();
		return false;
}

// primary_caretaker_relationship_status_other
if ((radiobutton_primary_caretaker_relationship_status == 5 &&
	 thisform.primary_caretaker_relationship_status_other.value.length == 0) ||
	(radiobutton_primary_caretaker_relationship_status == 5 &&
	 thisform.primary_caretaker_relationship_status_other.value == null)) {
        alert("Please enter the relationship status of the primary caretaker.");
        thisform.primary_caretaker_relationship_status_other.focus();
        return false;
}

// primary_caretaker_work_status
radiobutton_primary_caretaker_work_status = -1;
for (i=0; i<thisform.primary_caretaker_work_status.length; i++) {
	if (thisform.primary_caretaker_work_status[i].checked) {
		radiobutton_primary_caretaker_work_status = i;
}}

if (radiobutton_primary_caretaker_work_status == -1) {
		alert("Please indicate the work status of the primary caretaker.");
		thisform.primary_caretaker_work_status[0].focus();
		return false;
}

// primary_caretaker_work_status_other
if ((radiobutton_primary_caretaker_work_status == 5 &&
	 thisform.primary_caretaker_work_status_other.value.length == 0) ||
	(radiobutton_primary_caretaker_work_status == 5 &&
	 thisform.primary_caretaker_work_status_other.value == null)) {
        alert("Please enter the work status of the primary caretaker.");
        thisform.primary_caretaker_work_status_other.focus();
        return false;
}

// primary_caretaker_occupation
if ((thisform.primary_caretaker_occupation.value.length == 0) ||
	(thisform.primary_caretaker_occupation.value == null)) {
		alert("Please enter the primary caretaker's occupation.");
    	thisform.primary_caretaker_occupation.focus();
    	return false;
}

// primary_caretaker_income
if ((thisform.primary_caretaker_income.value.length == 0) ||
    (thisform.primary_caretaker_income.value == null)) {
		alert("Please enter the primary caretaker's total family income.");
		thisform.primary_caretaker_income.focus();
		return false;
}
  
validformat=/^\d+$/
if (!validformat.test(primary_caretaker_income.value)) {
	alert("Invalid income format. Please enter numbers only, with no commas or spaces.")
	thisform.primary_caretaker_income.focus();
    return false;

}

// secondary_caretaker_of_birth 
validformat=/^\d{2}\/\d{2}\/\d{4}$/
if ((thisform.secondary_caretaker_date_of_birth.value.length != 0) && 
	(!validformat.test(secondary_caretaker_of_birth.value))) {
		alert("Invalid date of birth format. Please correct and submit again.")
		thisform.secondary_caretaker_of_birth.focus();
    	return false;

}

//secondary_caretaker_phone
validformat=/^\(\d{3}\) \d{3}\-\d{4}$/
if ((thisform.secondary_caretaker_phone_home.value.length != 0) && 
	(!validformat.test(secondary_caretaker_phone_home.value))) {
		alert("Invalid home phone number format. Please correct and submit again.")
		thisform.secondary_caretaker_phone_home.focus();
    	return false;
}

if ((thisform.secondary_caretaker_phone_work.value.length != 0) && 
	(!validformat.test(secondary_caretaker_phone_work.value))) {
		alert("Invalid work phone number format. Please correct and submit again.")
		thisform.secondary_caretaker_phone_work.focus();
    	return false;
}

if ((thisform.secondary_caretaker_phone_cell.value.length != 0) && 
	(!validformat.test(secondary_caretaker_phone_cell.value))) {
		alert("Invalid cell phone number format. Please correct and submit again.")
		thisform.secondary_caretaker_phone_cell.focus();
    	return false;
}

// child_medical_problems
if ((thisform.child_medical_problems_1.checked == false) &&
    (thisform.child_medical_problems_2.checked == false) &&
    (thisform.child_medical_problems_3.checked == false) &&
    (thisform.child_medical_problems_4.checked == false) &&
    (thisform.child_medical_problems_5.checked == false) &&
    (thisform.child_medical_problems_6.checked == false) &&
    (thisform.child_medical_problems_7.checked == false) &&
    (thisform.child_medical_problems_8.checked == false) &&
    (thisform.child_medical_problems_9.checked == false) &&
	(thisform.child_medical_problems_10.checked == false) &&
	(thisform.child_medical_problems_11.checked == false) &&
	(thisform.child_medical_problems_12.checked == false) &&
	(thisform.child_medical_problems_13.checked == false) &&
	(thisform.child_medical_problems_14.checked == false) &&
	(thisform.child_medical_problems_15.checked == false) &&
    (thisform.child_medical_problems_16.checked == false)) {
		alert("Please indicate the problem(s) your child has experienced or check the box marked 'not applicable.'");
		thisform.child_medical_problems_1.focus();
		return false;
}

// child_medical_problems_other
if ((thisform.child_medical_problems_15.checked == true &&
	 thisform.child_medical_problems_other.value.length == 0) ||
    (thisform.child_medical_problems_15.checked == true &&
	 thisform.child_medical_problems_other.value == null)) {
        alert("Please enter the kind of problem your child has experienced.");
        thisform.child_medical_problems_other.focus();
        return false;
}

// serious_medical_problems
if ((thisform.serious_medical_problems_not_applicable.checked == false &&
	 thisform.serious_medical_problems.value.length == 0) ||
    (thisform.serious_medical_problems_not_applicable.checked == false &&
	 thisform.serious_medical_problems.value == null)) {
        alert("Please describe any serious or chronic medical or physical problems. Otherwise, check the box marked 'not applicable.'");
        thisform.serious_medical_problems.focus();
        return false;
}

// current_and_past_medications
if (((thisform.current_and_past_medications.value.length == 0) ||
    (thisform.current_and_past_medications.value == null)) &&
	(thisform.current_and_past_medications_not_applicable.checked == false)){
		alert("Please list your child's current and past medications. Otherwise, check the box marked 'not applicable'.");
		thisform.current_and_past_medications.focus();
		return false;
}

// child_feelings
if ((thisform.child_feelings_1.checked == false) &&
    (thisform.child_feelings_2.checked == false) &&
    (thisform.child_feelings_3.checked == false) &&
    (thisform.child_feelings_4.checked == false) &&
    (thisform.child_feelings_5.checked == false) &&
    (thisform.child_feelings_6.checked == false) &&
    (thisform.child_feelings_7.checked == false) &&
    (thisform.child_feelings_8.checked == false) &&
    (thisform.child_feelings_9.checked == false) &&
	(thisform.child_feelings_10.checked == false) &&
	(thisform.child_feelings_11.checked == false) &&
	(thisform.child_feelings_12.checked == false) &&
    (thisform.child_feelings_13.checked == false)) {
		alert("Please indicate the feelings or thoughts your child is experiencing or check the box marked 'not applicable.'");
		thisform.child_feelings_1.focus();
		return false;
}

// child_feelings_other
if ((thisform.child_feelings_12.checked == true &&
	 thisform.child_feelings_other.value.length == 0) ||
    (thisform.child_feelings_12.checked == true &&
	 thisform.child_feelings_other.value == null)) {
        alert("Please describe the feeling or thoughts your child is experiencing.");
        thisform.child_feelings_other.focus();
        return false;
}

// child_feelings_how_long
if ((thisform.child_feelings_1.checked == true ||
    thisform.child_feelings_2.checked == true ||
    thisform.child_feelings_3.checked == true ||
    thisform.child_feelings_4.checked == true ||
    thisform.child_feelings_5.checked == true ||
    thisform.child_feelings_6.checked == true ||
    thisform.child_feelings_7.checked == true ||
    thisform.child_feelings_8.checked == true ||
    thisform.child_feelings_9.checked == true ||
	thisform.child_feelings_10.checked == true ||
	thisform.child_feelings_11.checked == true ||
    thisform.child_feelings_12.checked == true) &&
    (thisform.child_feelings_how_long.value.length == 0 ||
	 thisform.child_feelings_how_long.value == null)){
		alert("Please indicate how long your child has been feeling this way.");
		thisform.child_feelings_how_long.focus();
		return false;
}

// child_problem
if ((thisform.child_problem.value.length == 0) ||
    (thisform.child_problem.value == null)) {
		alert("Please describe, in your own words, the problem your child is experiencing.");
		thisform.child_problem.focus();
		return false;
}

// recent_changes
if ((thisform.recent_changes_1.checked == false) &&
    (thisform.recent_changes_2.checked == false) &&
	(thisform.recent_changes_3.checked == false) &&
    (thisform.recent_changes_4.checked == false)) {
		alert("Please indicate whether or not anything has happened that might be related to these feelings, or check the box marked 'not applicable.'");
		thisform.recent_changes_1.focus();
		return false;
}

// recent_changes_other
if ((thisform.recent_changes_3.checked == true &&
	 thisform.recent_changes_other.value.length == 0) ||
    (thisform.recent_changes_3.checked == true &&
	 thisform.recent_changes_other.value == null)) {
        alert("Please describe the recent change or occurrence.");
        thisform.recent_changes_other.focus();
        return false;
}

// felt_this_way_in_past
radiobutton_felt_this_way_in_past = -1;
for (i=0; i<thisform.felt_this_way_in_past.length; i++) {
	if (thisform.felt_this_way_in_past[i].checked) {
		radiobutton_felt_this_way_in_past = i;
}}

if (radiobutton_felt_this_way_in_past == -1) {
		alert("Please indicate whether or not your child has felt this way in the past. Otherwise, check the button marked 'not applicable.'");
		thisform.felt_this_way_in_past[0].focus();
		return false;
}

if ((radiobutton_felt_this_way_in_past == 0) &&
	((thisform.felt_this_way_in_past_description.value.length == 0) ||
	 (thisform.felt_this_way_in_past_description.value == null))){
		alert("Please describe how your child has felt in the past.");
		thisform.felt_this_way_in_past_description.focus();
		return false;
}

// school_problems
if ((thisform.school_problems_1.checked == false) &&
    (thisform.school_problems_2.checked == false) &&
    (thisform.school_problems_3.checked == false) &&
    (thisform.school_problems_4.checked == false) &&
    (thisform.school_problems_5.checked == false) &&
    (thisform.school_problems_6.checked == false) &&
    (thisform.school_problems_7.checked == false) &&
    (thisform.school_problems_8.checked == false) &&
    (thisform.school_problems_9.checked == false) &&
	(thisform.school_problems_10.checked == false) &&
	(thisform.school_problems_11.checked == false) &&
	(thisform.school_problems_12.checked == false) &&
    (thisform.school_problems_13.checked == false)) {
		alert("Please indicate any problems your child has experienced in school or check the box marked 'no problems.'");
		thisform.school_problems_1.focus();
		return false;
}

// school_problems_other
if ((thisform.school_problems_12.checked == true &&
	 thisform.school_problems_other.value.length == 0) ||
    (thisform.school_problems_12.checked == true &&
	 thisform.school_problems_other.value == null)) {
        alert("Please describe the problem your child has been experiencing in school.");
        thisform.school_problems_other.focus();
        return false;
}

// behavioral_excesses
if ((thisform.behavioral_excesses.value.length == 0) ||
    (thisform.behavioral_excesses.value == null)) {
		alert("Please enter a description of the child's behavioral excesses.");
		thisform.behavioral_excesses.focus();
		return false;
}

// behavioral_deficits
if ((thisform.behavioral_deficits.value.length == 0) ||
    (thisform.behavioral_deficits.value == null)) {
		alert("Please enter a description of the child's behavioral deficits.");
		thisform.behavioral_deficits.focus();
		return false;
}

// treatment_goals
if ((thisform.treatment_goals.value.length == 0) ||
    (thisform.treatment_goals.value == null)) {
		alert("Please enter a description of your treatment goals.");
		thisform.treatment_goals.focus();
		return false;
}

// prior_counseling
radiobutton_prior_counseling = -1;
for (i=0; i<thisform.prior_counseling.length; i++) {
	if (thisform.prior_counseling[i].checked) {
		radiobutton_prior_counseling = i;
}}

if (radiobutton_prior_counseling == -1) {
		alert("Please indicate whether or not your child has had counseling before.");
		thisform.prior_counseling[0].focus();
		return false;
}

// history_of_abuse
radiobutton_history_of_abuse = -1;
for (i=0; i<thisform.history_of_abuse.length; i++) {
	if (thisform.history_of_abuse[i].checked) {
		radiobutton_history_of_abuse = i;
}}

if (radiobutton_history_of_abuse == -1) {
		alert("Please indicate whether or not your child has ever experienced any type of abuse.");
		thisform.history_of_abuse[0].focus();
		return false;
}

// history_of_abuse_description
if ((radiobutton_history_of_abuse == 0 &&
	 thisform.history_of_abuse_description.value.length == 0) ||
	(radiobutton_history_of_abuse == 0 &&
	 thisform.history_of_abuse_description.value == null)) {
        alert("Please describe the abuse your child has experienced.");
        thisform.history_of_abuse_description.focus();
        return false;
}

// hurt_self_or_others
radiobutton_hurt_self_or_others = -1;
for (i=0; i<thisform.hurt_self_or_others.length; i++) {
	if (thisform.hurt_self_or_others[i].checked) {
		radiobutton_hurt_self_or_others = i;
}}

if (radiobutton_hurt_self_or_others == -1) {
		alert("Please indicate whether or not your child has ever made statements about hurting him/herself or seriously hurting others.");
		thisform.hurt_self_or_others[0].focus();
		return false;
}

// hurt_self_or_others_description
if ((radiobutton_hurt_self_or_others == 0 &&
	 thisform.hurt_self_or_others_description.value.length == 0) ||
	(radiobutton_hurt_self_or_others == 0 &&
	 thisform.hurt_self_or_others_description.value == null)) {
        alert("Please describe statements or actions your child has made in regards to seriously hurting him or herself or others.");
        thisform.hurt_self_or_others_description.focus();
        return false;
}

// emotional_losses
radiobutton_emotional_losses = -1;
for (i=0; i<thisform.emotional_losses.length; i++) {
	if (thisform.emotional_losses[i].checked) {
		radiobutton_emotional_losses = i;
}}

if (radiobutton_emotional_losses == -1) {
		alert("Please indicate whether or not your child has ever experienced any serious emotional losses.");
		thisform.emotional_losses[0].focus();
		return false;
}

// emotional_losses_description
if ((radiobutton_emotional_losses == 0 &&
	 thisform.emotional_losses_description.value.length == 0) ||
	(radiobutton_emotional_losses == 0 &&
	 thisform.emotional_losses_description.value == null)) {
        alert("Please describe the emotional loss(es) your child has experienced.");
        thisform.emotional_losses_description.focus();
        return false;
}

// crime
radiobutton_crime = -1;
for (i=0; i<thisform.crime.length; i++) {
	if (thisform.crime[i].checked) {
		radiobutton_crime = i;
}}

if (radiobutton_crime == -1) {
		alert("Please indicate whether or not your child has ever been charged with or convicted of a crime.");
		thisform.crime[0].focus();
		return false;
}

// crime_description
if ((radiobutton_crime == 0 &&
	 thisform.crime_description.value.length == 0) ||
	(radiobutton_crime == 0 &&
	 thisform.crime_description.value == null)) {
        alert("Please describe the charge or conviction.");
        thisform.crime_description.focus();
        return false;
}

// other_concerns
radiobutton_other_concerns = -1;
for (i=0; i<thisform.other_concerns.length; i++) {
	if (thisform.other_concerns[i].checked) {
		radiobutton_other_concerns = i;
}}

if (radiobutton_other_concerns == -1) {
		alert("Please indicate whether or not you have any other concerns.");
		thisform.other_concerns[0].focus();
		return false;
}

// other_concerns_description
if ((radiobutton_other_concerns == 0 &&
	 thisform.other_concerns_description.value.length == 0) ||
	(radiobutton_other_concerns == 0 &&
	 thisform.other_concerns_description.value == null)) {
        alert("Please describe your additional concerns.");
        thisform.other_concerns_description.focus();
        return false;
}

// caretaker_hospitalized
radiobutton_caretaker_hospitalized = -1;
for (i=0; i<thisform.caretaker_hospitalized.length; i++) {
	if (thisform.caretaker_hospitalized[i].checked) {
		radiobutton_caretaker_hospitalized = i;
}}

if (radiobutton_caretaker_hospitalized == -1) {
		alert("Please indicate whether or not you have ever been hospitalied for psychological reasons.");
		thisform.caretaker_hospitalized[0].focus();
		return false;
}

// caretaker_hospitalization_description
if ((radiobutton_caretaker_hospitalized == 0 &&
	 thisform.caretaker_hospitalization_description.value.length == 0) ||
	(radiobutton_caretaker_hospitalized == 0 &&
	 thisform.caretaker_hospitalization_description.value == null)) {
        alert("Please explain what the hospitalization was for and when it occurred.");
        thisform.caretaker_hospitalization_description.focus();
        return false;
}

// caretaker_medications
radiobutton_caretaker_medications = -1;
for (i=0; i<thisform.caretaker_medications.length; i++) {
	if (thisform.caretaker_medications[i].checked) {
		radiobutton_caretaker_medications = i;
}}

if (radiobutton_caretaker_medications == -1) {
		alert("Please indicate whether or not you are currently taking any medications for anxiety, depression, ADHD, etc.");
		thisform.caretaker_medications[0].focus();
		return false;
}

// caretaker_medications_description
if ((radiobutton_caretaker_medications == 0 &&
	 thisform.caretaker_medications_description.value.length == 0) ||
	(radiobutton_caretaker_medications == 0 &&
	 thisform.caretaker_medications_description.value == null)) {
        alert("Please list the names and dosages of the medication(s).");
        thisform.caretaker_medications_description.focus();
        return false;
}

// caretaker_alcoholic_drinks_per_week
radiobutton_caretaker_alcoholic_drinks_per_week = -1;
for (i=0; i<thisform.caretaker_alcoholic_drinks_per_week.length; i++) {
	if (thisform.caretaker_alcoholic_drinks_per_week[i].checked) {
		radiobutton_caretaker_alcoholic_drinks_per_week = i;
}}

if (radiobutton_caretaker_alcoholic_drinks_per_week == -1) {
		alert("Please indicate how many alcoholic drinks you have in a week.");
		thisform.caretaker_alcoholic_drinks_per_week[0].focus();
		return false;
}

// caretaker_drugs
radiobutton_caretaker_drugs = -1;
for (i=0; i<thisform.caretaker_drugs.length; i++) {
	if (thisform.caretaker_drugs[i].checked) {
		radiobutton_caretaker_drugs = i;
}}

if (radiobutton_caretaker_drugs == -1) {
		alert("Please indicate whether or not you use street drugs.");
		thisform.caretaker_drugs[0].focus();
		return false;
}

// caretaker_fights
radiobutton_caretaker_fights = -1;
for (i=0; i<thisform.caretaker_fights.length; i++) {
	if (thisform.caretaker_fights[i].checked) {
		radiobutton_caretaker_fights = i;
}}

if (radiobutton_caretaker_fights == -1) {
		alert("Please indicate whether or not you are ever involved in physical fights.");
		thisform.caretaker_fights[0].focus();
		return false;
}

// caretaker_legal_system
radiobutton_caretaker_legal_system = -1;
for (i=0; i<thisform.caretaker_legal_system.length; i++) {
	if (thisform.caretaker_legal_system[i].checked) {
		radiobutton_caretaker_legal_system = i;
}}

if (radiobutton_caretaker_legal_system == -1) {
		alert("Please indicate whether or not you are or have ever been involved in the legal system.");
		thisform.caretaker_legal_system[0].focus();
		return false;
}

// caretaker_child_protective_service
radiobutton_caretaker_child_protective_service = -1;
for (i=0; i<thisform.caretaker_child_protective_service.length; i++) {
	if (thisform.caretaker_child_protective_service[i].checked) {
		radiobutton_caretaker_child_protective_service = i;
}}

if (radiobutton_caretaker_child_protective_service == -1) {
		alert("Please indicate whether or not your family has ever been involved with Child Protective Services.");
		thisform.caretaker_child_protective_service[0].focus();
		return false;
}

// caretaker_custody_loss
radiobutton_caretaker_custody_loss = -1;
for (i=0; i<thisform.caretaker_custody_loss.length; i++) {
	if (thisform.caretaker_custody_loss[i].checked) {
		radiobutton_caretaker_custody_loss = i;
}}

if (radiobutton_caretaker_custody_loss == -1) {
		alert("Please indicate whether or not you have ever lost custody of your children.");
		thisform.caretaker_custody_loss[0].focus();
		return false;
}

thisform.submit(); // this line submits the form after validation
}
