<!--
//Habilita ou desabilita as opções de acordo com os fatos.
/*function Next(obj,opcao)
{
	var nome = obj.slice(5);
	var nome_final = Number(nome) + 1;
	for(var i=0;i<=10;i++) {
		if(document.getElementById("resp_" + nome).options[i].selected == true) {
			if(document.getElementById(obj).options[i].value != "") {
				if(obj != "resp_10") {
					document.getElementById("resp_" + nome_final).disabled = false;
					for(var m=nome_final;m<=10;m++) {
						if(document.getElementById("resp_" + m).options[document.getElementById("resp_" + m).selectedIndex].value != "") {
							document.getElementById("resp_" + m).disabled = false;
						} else {
							if(m > 1) {
								o = Number(m)-Number(1);
							} else {
								o = m;
							}
							if(document.getElementById("resp_" + o).options[document.getElementById("resp_" + o).selectedIndex].value != "") {
								n = Number(m);
								document.getElementById("resp_" + n).disabled = false;
							}
						}
					}
				}
			} else {
				for(var x=nome_final;x<=10;x++) {
					document.getElementById("resp_" + x).disabled = true;
				}
			}
		}
	}
}*/

//Soma os pontos que o usuário marcou.
function Verifica() {
    total = 0;
	
   	if (document.getElementById("resp_1").options[document.getElementById("resp_1").selectedIndex].value == 4) {
		total = total + 1;
	}
   	if (document.getElementById("resp_2").options[document.getElementById("resp_2").selectedIndex].value == 6) {
		total = total + 1;
	}
  	if (document.getElementById("resp_3").options[document.getElementById("resp_3").selectedIndex].value == 1) {
		total = total + 1;
	}
  	if (document.getElementById("resp_4").options[document.getElementById("resp_4").selectedIndex].value == 2) {
		total = total + 1;
	}
  	if (document.getElementById("resp_5").options[document.getElementById("resp_5").selectedIndex].value == 10) {
		total = total + 1;
	}
  	if (document.getElementById("resp_6").options[document.getElementById("resp_6").selectedIndex].value == 5) {
		total = total + 1;
	}
  	if (document.getElementById("resp_7").options[document.getElementById("resp_7").selectedIndex].value == 7) {
		total = total + 1;
	}
  	if (document.getElementById("resp_8").options[document.getElementById("resp_8").selectedIndex].value == 3) {
		total = total + 1;
	}
  	if (document.getElementById("resp_9").options[document.getElementById("resp_9").selectedIndex].value == 8) {
		total = total + 1;
	}
  	if (document.getElementById("resp_10").options[document.getElementById("resp_10").selectedIndex].value == 9) {
		total = total + 1;
	}
	if(total == 10) {
	   alert('Parabéns! Você acertou todas!!')}
	else {
		if (total <= 1) {
			if (total==1) {
				alert('Você fez somente ' + total + ' ponto. Verifique suas respostas e tente novamente.')}else{alert('Você não fez nenhum ponto. Verifique suas respostas e tente novamente.')
			}
		} else {
			alert('Você fez somente ' + total + ' pontos. Verifique suas respostas e tente novamente.')
		}
	}
}
//-->