Question:
Score:

Go back to Archery Equipment

"); parent.frames[win].document.writeln(mesg); parent.frames[win].document.writeln(""); parent.frames[win].document.close(); } function shuffle_choice_list() { var i,j,k,temp; var count = choice_list.length; for (i=0;i<=(count/2);i++) { j = Math.floor(Math.random()*count); k = Math.floor(Math.random()*count); temp = choice_list[j]; choice_list[j] = choice_list[k]; choice_list[k] = temp; } } //question object function QUESTION(picture,answer,hint) { this.picture = Base_Image_URL + picture; this.answer = answer; this.hint = Base_Hint_URL + hint; } function shuffle_question_list() { var temp,i,j,k; var count = question_list.length; for (i=0;i<=(count/2);i++) { j = Math.floor(Math.random()*count); k = Math.floor(Math.random()*count); temp = question_list[j]; question_list[j] = question_list[k]; question_list[k] = temp; } } // randomly create question function create_question() { var i,j,mesg; next_test = false; correct_choice = Math.floor(Math.random()* Num_of_Choice); choice_value[correct_choice] = question_list[question_num].answer; //create random choices shuffle_choice_list(); //i = current choice_value pos counter //j = current choice_list pos counter for(i=0,j=0;i"; send_mesg(mesg,pictWindow); // while(!document.testpic.complete); //wait till image loaded with (document.test) { for (i=0;iReStart button to begin a new game.",msgWindow); } } //check if answer is correct and calculate total function checkAnswer(choice) { var soundfile = ""; if (done_test) { send_mesg("The test is over. Press the ReStart button to take the test again.",msgWindow); return; //don't do anything if test is done } if (!next_test) return; //don't check if test is not ready next_test = false; //set flag to prevent repeat clicks in the answer if (correct_choice == choice) { mesg = "

Correct !!!
"; soundfile = correctSound; total_score++; } else { mesg = "

Good guess. But the correct answer is: " + question_list[question_num].answer + "."; mesg += "

Look below for description of the picture."; soundfile = wrongSound; window.open(question_list[question_num].hint,"hintwin"); } document.test.score.value=total_score; if ((question_num+1) < Num_of_Question) { if (correct_choice == choice) { setTimeout('nextQuestion()',100); //auto setup next question }else { mesg +="

Click on Next to try another picture."; //wait for user to manually go to next question } } else { done_test = true; per = total_score/Num_of_Question; mesg +="

Your score is " + Math.round(per*100) +"%.

"; if (per >= 1) mesg += "

Your knowledge of world geography is excellent!
"; else if (per > 0.89) mesg +="

You are quite good.
"; else if (per > 0.79) mesg +="

Fabulous. Browse through this web site and try again to see if you can improve the score."; else mesg +="

Browse this site and try again to see if you can improve the score.
"; } //add code to play sound //background sound for Internet Explorer. mesg +=""; // Background sound for Netscape Navigator. if (navigator.appName == "Netscape") { mesg +=""; } send_mesg(mesg,msgWindow); } function beginTest() { //randomize the question array if (done_test){ //make sure we are not in currently doing a test done_test = false; shuffle_question_list(); question_num = 0; //current question counter total_score = 0; //score next_test = false; //flag indicating readiness of next question send_mesg("
Let's Play A New Game
",msgWindow); create_question(); document.test.quest_num.value=(question_num+1) + " of " + Num_of_Question; document.test.score.value=total_score; } } // -->