
//function total the quiz answers
// assigns correct answers in array.
function total()
{var tot = 0;
//answer#[0-3] 0=A, 1=B, 2=C, 3=D 
if (document.quiz.answer0[1].checked == true) tot = 2;

if (document.quiz.answer1[2].checked == true) tot += 2;
  
if (document.quiz.answer2[0].checked == true) tot += 2;
 
if (document.quiz.answer3[0].checked == true) tot += 2;
  
if (document.quiz.answer4[3].checked == true) tot += 2;
  
if (document.quiz.answer5[0].checked == true) tot += 2;
  
if (document.quiz.answer6[1].checked == true) tot += 2;
  
if (document.quiz.answer7[0].checked == true) tot += 2;
 
if (document.quiz.answer8[2].checked == true) tot += 2;
  
if (document.quiz.answer9[3].checked == true) tot += 2;
if (document.quiz.answer10[1].checked == true) tot += 2;
if (document.quiz.answer11[0].checked == true) tot += 2;
if (document.quiz.answer12[2].checked == true) tot += 2;
if (document.quiz.answer13[3].checked == true) tot += 2;
if (document.quiz.answer14[3].checked == true) tot += 2;
if (document.quiz.answer15[0].checked == true) tot += 2;
if (document.quiz.answer16[1].checked == true) tot += 2;
if (document.quiz.answer17[3].checked == true) tot += 2;
if (document.quiz.answer18[1].checked == true) tot += 2;
if (document.quiz.answer19[1].checked == true) tot += 2;
if (document.quiz.answer20[2].checked == true) tot += 2;
if (document.quiz.answer21[1].checked == true) tot += 2;
if (document.quiz.answer22[2].checked == true) tot += 2;
if (document.quiz.answer23[1].checked == true) tot += 2;
if (document.quiz.answer24[1].checked == true) tot += 2;
if (document.quiz.answer25[1].checked == true) tot += 2;
if (document.quiz.answer26[2].checked == true) tot += 2;
if (document.quiz.answer27[3].checked == true) tot += 2;
if (document.quiz.answer28[2].checked == true) tot += 2;
if (document.quiz.answer29[2].checked == true) tot += 2;
if (document.quiz.answer30[1].checked == true) tot += 2;
if (document.quiz.answer31[0].checked == true) tot += 2;
if (document.quiz.answer32[0].checked == true) tot += 2;
if (document.quiz.answer33[3].checked == true) tot += 2;
if (document.quiz.answer34[1].checked == true) tot += 2;
if (document.quiz.answer35[3].checked == true) tot += 2;
if (document.quiz.answer36[1].checked == true) tot += 2;
if (document.quiz.answer37[2].checked == true) tot += 2;
if (document.quiz.answer38[0].checked == true) tot += 2;
if (document.quiz.answer39[0].checked == true) tot += 2;
if (document.quiz.answer40[2].checked == true) tot += 2;
if (document.quiz.answer41[1].checked == true) tot += 2;
if (document.quiz.answer42[0].checked == true) tot += 2;
if (document.quiz.answer43[3].checked == true) tot += 2;
if (document.quiz.answer44[3].checked == true) tot += 2;
if (document.quiz.answer45[2].checked == true) tot += 2;
if (document.quiz.answer46[2].checked == true) tot += 2;
if (document.quiz.answer47[0].checked == true) tot += 2;
if (document.quiz.answer48[1].checked == true) tot += 2;
if (document.quiz.answer49[2].checked == true) tot += 2;
                                                  
  

if (tot==0) document.quiz.totalscore.value ="你的成绩是0分，不及格";
if (tot==2) document.quiz.totalscore.value ="你的成绩是2分，不及格";
if (tot==4) document.quiz.totalscore.value ="你的成绩是4分，不及格";
if (tot==6) document.quiz.totalscore.value ="你的成绩是6分，不及格";
if (tot==8) document.quiz.totalscore.value ="你的成绩是8分，不及格";
if (tot==10) document.quiz.totalscore.value ="你的成绩是10分，不及格";
if (tot==12) document.quiz.totalscore.value ="你的成绩是12分，不及格";
if (tot==14) document.quiz.totalscore.value ="你的成绩是14分，不及格";
if (tot==16) document.quiz.totalscore.value ="你的成绩是16分，不及格";
if (tot==18) document.quiz.totalscore.value ="你的成绩是18分，不及格";
if (tot==20) document.quiz.totalscore.value ="你的成绩是20分，不及格";
if (tot==22) document.quiz.totalscore.value ="你的成绩是22分，不及格";
if (tot==24) document.quiz.totalscore.value ="你的成绩是24分，不及格";
if (tot==26) document.quiz.totalscore.value ="你的成绩是26分，不及格";
if (tot==28) document.quiz.totalscore.value ="你的成绩是28分，不及格";
if (tot==30) document.quiz.totalscore.value ="你的成绩是30分，不及格";
if (tot==32) document.quiz.totalscore.value ="你的成绩是32分，不及格";
if (tot==36) document.quiz.totalscore.value ="你的成绩是36分，不及格";
if (tot==38) document.quiz.totalscore.value ="你的成绩是38分，不及格";
if (tot==40) document.quiz.totalscore.value ="你的成绩是40分，不及格";
if (tot==42) document.quiz.totalscore.value ="你的成绩是42分，不及格";
if (tot==44) document.quiz.totalscore.value ="你的成绩是44分，不及格";
if (tot==46) document.quiz.totalscore.value ="你的成绩是46分，不及格";
if (tot==48) document.quiz.totalscore.value ="你的成绩是48分，不及格";
if (tot==50) document.quiz.totalscore.value ="你的成绩是50分，不及格";
if (tot==52) document.quiz.totalscore.value ="你的成绩是52分，不及格";
if (tot==54) document.quiz.totalscore.value ="你的成绩是54分，不及格";
if (tot==56) document.quiz.totalscore.value ="你的成绩是56分，不及格";
if (tot==58) document.quiz.totalscore.value ="你的成绩是58分，不及格";
if (tot==60) document.quiz.totalscore.value ="你的成绩是60分，及格";
if (tot==62) document.quiz.totalscore.value ="你的成绩是62分，及格";
if (tot==64) document.quiz.totalscore.value ="你的成绩是64分，及格";
if (tot==66) document.quiz.totalscore.value ="你的成绩是66分，及格";
if (tot==68) document.quiz.totalscore.value ="你的成绩是68分，及格";
if (tot==70) document.quiz.totalscore.value ="你的成绩是70分，及格";
if (tot==72) document.quiz.totalscore.value ="你的成绩是72分，及格";
if (tot==74) document.quiz.totalscore.value ="你的成绩是74分，及格";
if (tot==76) document.quiz.totalscore.value ="你的成绩是76分，良好";
if (tot==78) document.quiz.totalscore.value ="你的成绩是78分，良好";
if (tot==80) document.quiz.totalscore.value ="你的成绩是80分，良好";
if (tot==82) document.quiz.totalscore.value ="你的成绩是82分，良好";
if (tot==84) document.quiz.totalscore.value ="你的成绩是84分，良好";
if (tot==86) document.quiz.totalscore.value ="你的成绩是86分，优秀";
if (tot==88) document.quiz.totalscore.value ="你的成绩是88分，优秀";
if (tot==90) document.quiz.totalscore.value ="你的成绩是90分，优秀";
if (tot==92) document.quiz.totalscore.value ="你的成绩是92分，优秀";
if (tot==94) document.quiz.totalscore.value ="你的成绩是94分，优秀";
if (tot==96) document.quiz.totalscore.value ="你的成绩是96分，优秀";
if (tot==98) document.quiz.totalscore.value ="你的成绩是98分，优秀";
if (tot==100) document.quiz.totalscore.value ="你的成绩是100分，非常优秀";



 }

