function test_it(entry) {
  if (entry.value!=null && entry.value.length!=0) {
    entry.value=""+ eval(entry.value);
  }
  computeForm(entry.form);
}

function computeForm(form) {
  var total=0
  
	for (var count=0; count<7; count++) {
    if (form.q1[count].checked) {
      var total=total+parseInt(form.q1[count].value);
    }
  }

  for (var count=0; count<4; count++) {
    if (form.q2[count].checked) {
      var total=total+parseInt(form.q2[count].value);
    }
  }

  for (var count=0; count<3; count++) {
    if (form.q3[count].checked) {
      var total=total+parseInt(form.q3[count].value);
    }
  }

  for (var count=0; count<4; count++) {
    if (form.q4[count].checked) {
      var total=total+parseInt(form.q4[count].value);
    }
	}

  for (var count=0; count<4; count++) {
    if (form.q5[count].checked) {
      var total=total+parseInt(form.q5[count].value);
    }
	}

  for (var count=0; count<2; count++) {
    if (form.q6[count].checked) {
      var total=total+parseInt(form.q6[count].value);
    }
	}

  for (var count=0; count<5; count++) {
    if (form.q7[count].checked) {
      var total=total+parseInt(form.q7[count].value);
    }
	}

  for (var count=0; count<7; count++) {
    if (form.q8[count].checked) {
      var total=total+parseInt(form.q8[count].value);
    }
	}

  for (var count=0; count<3; count++) {
    if (form.q9[count].checked) {
      var total=total+parseInt(form.q9[count].value);
    }
  }
	
  if (total<1) {
		alert('You have not fully answered the quiz!');
	} else if (total<40) {
		alert('Thank you for completing our "Are you a candidate for Collaborative Family Law" Quiz. Your answers suggest that neither mediation nor collaborative law would work for you at this time.');
	} else if (total<60) {
		alert('Thank you for completing our "Are you a candidate for Collaborative Family Law" Quiz. Your answers suggest that collaborative law would work for you at this time.');
	} else if (total<80) {
		alert('Thank you for completing our "Are you a candidate for Collaborative Family Law" Quiz. Your answers suggest that either mediation or collaborative law would work for you at this time.');
  } else {
		alert('Thank you for completing our "Are you a candidate for Collaborative Family Law" Quiz. Your answers suggest that mediation would work for you at this time.');
  }
}

