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%. Gawd! Do you really want to keep this relationship, or ruin it? You are way too possessive!"; } if(score>10& score<=20) { var display_text ="You scored 20%. C'mon! What's a relationship without any trust? Find out why you don't trust your partner and confront him/her with the reasons. "; } if(score>20& score<=30) { var display_text ="You scored 30%. Buddy, if you really value this relationship, find out what irks you about your partner that makes you feel so jealous. Then, sit down with him/her for a nice and frank talk. "; } if(score>30& score<=40) { var display_text ="You scored 40%. Hmmm... Looks like you want to trust your partner, but you still have your doubts. Best thing to do is to have a heart-to-heart talk. "; } if(score>40& score<=50) { var display_text ="You scored 50%. Can't stop fretting about what your partner does when he/she is not with you? Don't let irrational fears ruin your relationship. Evaluate your relationship, maybe there really isn't much to worry."; } if(score>50& score<=60) { var display_text ="You scored 60%. You are definitely in love with your partner. And perhaps very possessive too. Make sure that your partner does not feel smothered with your emotions. "; } if(score>60& score<=70) { var display_text ="You scored 70%. Well, not bad at all. Maybe you are a little possessive. As long as that is not in the excess, it will only serve to add spice to life, right? "; } if(score>70& score<=80) { var display_text ="You scored 80%. You are well balanced and mature. You trust your partner and expect trust in return. "; } if(score>80& score<=90) { var display_text ="You scored 90%. You and your partner share a really special and close bond. You understand that trust is vital to any relationship. You understand each other like no one else does."; } if(score>90& score<=100) { var display_text ="You scored a perfect 100%. Blind trust. Oooh… Your partner is perhaps a perfect angel. But does perfection exist? Your partner may end up taking you for granted!"; } 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; }