function grade_quiz()
{
	var obj_form = document.getElementById('quiz_form');
	
	var total = 0;
	
	for (var i = 0; i < obj_form.elements.length; i++) {
		if (obj_form.elements[i].nodeName.toLowerCase() != 'input') {
			continue;
		}
		
		if (obj_form.elements[i].type.toLowerCase() != 'checkbox') {
			continue;
		}
		
		if (obj_form.elements[i].checked == true) {
			total += 1;
		}
	}
	
	//alert(total);
	//return;
	
	// Act on the total
	if (total >= 5) {
		location = 'depression_survey_caution.php';
	} else {
		location = 'depression_survey_safe.php';
	}
}
