");
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 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 +="
";
if (per >= 1)
mesg += "