var threepoints = 'aabbccccccaabbaccacbb';
var twopoints = 'bbccbbbbbbcccbacaca';
 
function check() {
	var score = 0;
	for(var i=1;i<=21;i++) {
		for(var x=0;x<3;x++) {
			if(document.quiz.elements["q"+i][x].checked) {
				if(threepoints.charAt(i-1) == document.quiz.elements["q"+i][x].value) {
					score += 3;
				} else if(twopoints.charAt(i-1) == document.quiz.elements["q"+i][x].value) {
					score += 2;
				} else {
					score += 1;
				}
			}
		}
	}
	var msg;
	if(score <= 32) {
		msg = "Oopsie. You are one step away from being inducted into the Externally Directed Parenting Hall of Fame. If thatís the kind of notoriety you want, be my guest. If not, better brush up on some of the tactics described in Raising Children Who Think for Themselves.";
	} else if(score <= 42) {
		msg = "Close but no cigar. Youíre raising Junior to be influenced by the expectations and approval of other people the majority of the time. Sometimes he has a mind of his own, but those times are as rare as chicken lips.";
	} else if(score <= 52) {
		msg = "Youíre raising your kid to think for himself most of the time. Maturity may help fill in the blanks, but just in case, read Raising Children Who Think for Themselves to bone up on internally directed parenting skills you might not know about.";
	} else {
		msg = "Wow! Good job! You are the supreme parental raiser of self-directed children. Youíve got your kid making her choices using her powers of reason. Because of this, she is blessed with a high self-esteem, a deep sense of integrity and solid self-confidence. She is competent, independent and unafraid to face failure or take risks. And because she finds ways to be an asset within any group, she will make great strides in life, both personally and for any group she chooses to belong to. (Can I send my kids over to your place for a few months so you can whip them into shape, too?)";
	}
	alert(msg);
}