var display_text=" "; var place; var meter; var out = " "; var place = 50; var score = 0; var howmany = 10; var ans = new Array; ans[0] = 0; ans[1] = 0; ans[2] = 0; ans[3] = 0; ans[4] = 0; ans[5] = 0; ans[6] = 0; ans[7] = 0; ans[8] = 0; ans[9] = 0; function addscore() { if((document.formfest.q1[0].checked==false)&&(document.formfest.q1[1].checked==false)&&(document.formfest.q1[2].checked==false)) {alert("Question no.1 needs to be answered.");document.formfest.q1[0].focus(); return false;} if((document.formfest.q2[0].checked==false)&&(document.formfest.q2[1].checked==false)&&(document.formfest.q2[2].checked==false)) {alert(" Question no.2 needs to be answered.");document.formfest.q2[0].focus(); return false;} if((document.formfest.q3[0].checked==false)&&(document.formfest.q3[1].checked==false)&&(document.formfest.q3[2].checked==false)) {alert(" Question no.3 needs to be answered.");document.formfest.q3[0].focus();return false;} if((document.formfest.q4[0].checked==false)&&(document.formfest.q4[1].checked==false)&&(document.formfest.q4[2].checked==false)) {alert(" Question no.4 needs to be answered.");document.formfest.q4[0].focus();return false;} if((document.formfest.q5[0].checked==false)&&(document.formfest.q5[1].checked==false)&&(document.formfest.q5[2].checked==false)) {alert(" Question no.5 needs to be answered.");document.formfest.q5[0].focus();return false;} if((document.formfest.q6[0].checked==false)&&(document.formfest.q6[1].checked==false)&&(document.formfest.q6[2].checked==false)) {alert(" Question no.6 needs to be answered.");document.formfest.q6[0].focus();return false;} if((document.formfest.q7[0].checked==false)&&(document.formfest.q7[1].checked==false)&&(document.formfest.q7[2].checked==false)) {alert(" Question no.7 needs to be answered.");document.formfest.q7[0].focus();return false;} if((document.formfest.q8[0].checked==false)&&(document.formfest.q8[1].checked==false)&&(document.formfest.q8[2].checked==false)) {alert(" Question no.8 needs to be answered.");document.formfest.q8[0].focus();return false;} if((document.formfest.q9[0].checked==false)&&(document.formfest.q9[1].checked==false)&&(document.formfest.q9[2].checked==false)) {alert(" Question no.9 needs to be answered.");document.formfest.q9[0].focus();return false;} if((document.formfest.q10[0].checked==false)&&(document.formfest.q10[1].checked==false)&&(document.formfest.q10[2].checked==false)) {alert(" Question no.10 needs to be answered.");document.formfest.q10[0].focus();return false;} for (i = 0; i < howmany; i++) { score = parseInt(score) + parseInt(ans[i]);} scroll_text(); } function scroll_text() { // Change these values to include the entire range of scores if(score<=0) { var display_text ="You scored a zilch. Yuck! You're a cultural blockhead."; } if(score>0&& score<=10) { var display_text ="You scored 10%. You need to dig out your confidence. Looks like you have buried it real deep. But cheer up. Confidence is just act, the more you practice the better you get at it."; } if(score>10& score<=20) { var display_text ="You scored 20%. You need to dig out your confidence. Looks like you have buried it real deep. But cheer up. Confidence is just act, the more you practice the better you get at it."; } if(score>20& score<=30) { var display_text ="You scored 30%. Find out the reason behind your low self-esteem. Each person has unique qualities, focus on yours! "; } if(score>30& score<=40) { var display_text ="You scored 40%. Let's just say that you need extra push to get you into action, whether it is striking a conversation with a good looking boy/girl or signing at a party."; } if(score>40& score<=50) { var display_text ="You scored 50%. You are forever worried about others' approval. If you want to have fun and do wild things, all you have to do is chuck your inhibitions."; } if(score>50& score<=60) { var display_text ="You scored 60%. You see a great looking boy/girl, but you are wondering whether you should walk up and say Hi. I tell you, if you've brushed your teeth in the morning, simply go ahead. You are sure to score. All you need is a little more confidence. "; } if(score>60& score<=70) { var display_text ="You scored 70%. Hmmm… quite confident. There are times when you get really nervous, but you overcome it with ease. A little more confidence and there'd be no stopping you. "; } if(score>70& score<=80) { var display_text ="You scored 80%. You find yourself the centre of attraction at parties, and you wonder why. Trust me, it's your confident smile and bright attitude. You are a winner all the way. "; } if(score>80& score<=90) { var display_text ="You scored 90%. You are just the stuff winner's are made of. You overcome difficult situations with ease and impress people. Way to go!"; } if(score>90& score<=100) { var display_text ="You scored a perfect 100%. That is not confidence my dear. That is over-confidence. All I can say is that I hope you are not rubbing people the wrong way!"; } for (meter = 0; meter < place; meter++) { out += " "} if (place >= 0) out += display_text else out = display_text.substring(-place,display_text.length) document.formfest.field.value = out out = " " place-- if (place < -(display_text.length)) { place = 50 } setTimeout('scroll_text()',100) } function Quiz(question, answer) { ans[question] = answer; }