<!--
 //Myth Quiz Copyright (c) 2000-2007, All Rights Reserved

var total=0,average=0,currCount=0,page=0;
var url = new Array();
var m = new Array();
var q = new Array();

url[1]="http://www.sacc.to/sya/myths/quiz/myth1.htm";
url[2]="http://www.sacc.to/sya/myths/quiz/fact1.htm";
url[3]="http://www.sacc.to/sya/myths/quiz/myth2.htm";
url[4]="http://www.sacc.to/sya/myths/quiz/fact2.htm";
url[5]="http://www.sacc.to/sya/myths/quiz/myth3.htm";
url[6]="http://www.sacc.to/sya/myths/quiz/fact3.htm";
url[7]="http://www.sacc.to/sya/myths/quiz/myth4.htm";
url[8]="http://www.sacc.to/sya/myths/quiz/fact4.htm";
url[9]="http://www.sacc.to/sya/myths/quiz/myth5.htm";
url[10]="http://www.sacc.to/sya/myths/quiz/fact5.htm";
url[11]="http://www.sacc.to/sya/myths/quiz/myth6.htm";
url[12]="http://www.sacc.to/sya/myths/quiz/fact6.htm";
url[13]="http://www.sacc.to/sya/myths/quiz/myth7.htm";
url[14]="http://www.sacc.to/sya/myths/quiz/fact7.htm";
url[15]="http://www.sacc.to/sya/myths/quiz/myth8.htm";
url[16]="http://www.sacc.to/sya/myths/quiz/fact8.htm";
url[17]="http://www.sacc.to/sya/myths/quiz/myth9.htm";
url[18]="http://www.sacc.to/sya/myths/quiz/fact9.htm";
url[19]="http://www.sacc.to/sya/myths/quiz/myth10.htm";
url[20]="http://www.sacc.to/sya/myths/quiz/fact10.htm";

q[1]="q1";
q[2]="q2";
q[3]="q3";
q[4]="q4";
q[5]="q5";
q[6]="q6";
q[7]="q7";
q[8]="q8";
q[9]="q9";
q[10]="q10";


function init(){
 for (var i=0;i<11;i++){m[i]=0;}
 for (var i=0;i<11;i++){setCookie(q[i],-1,1);}
 setCookie('mark',0,1);
}
function calculate(u){
 total +=u;
 average = Math.round(total/currCount*100);
 setCookie('mark',average,1);
}
function checkAnswer(s,j,k,l){
 page = k;
 if (m[s]==0){
  m[s]=1;
  if(j==1){var answer=1;}
  else {var answer=0;}
  currCount += 1;
  calculate(j);
  explanation();
  setCookie(q[s],answer,1);
  setCookie('count',currCount,1);

  if((l==1)&&(k==1)){document.one.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==2)){document.two.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==3)){document.three.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==4)){document.four.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==5)){document.five.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==6)){document.six.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==7)){document.seven.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==8)){document.eight.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==9)){document.nine.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==10)){document.ten.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==11)){document.eleven.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==12)){document.twelve.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==13)){document.thirteen.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==14)){document.fourteen.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==15)){document.fifteen.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==16)){document.sixteen.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==17)){document.seventeen.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==18)){document.eighteen.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  if((l==1)&&(k==19)){document.nineteen.src="http://www.sacc.to/images/myths/quiz/mythCheck.jpg";}
  else if((l==2)&&(k==20)){document.twenty.src="http://www.sacc.to/images/myths/quiz/factCheck.jpg";}
  else {}

  checkCompletion();
 }
 else {
  window.open(href="http://www.sacc.to/sya/myths/quiz/questionAnswered.htm","remote","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=350,height=375");
  timerID1=setTimeout("explanation()",2000);
 }
}
function checkCompletion(){
 if (currCount==((url.length-1)/2)){
  timerID2=setTimeout("showResult()",45000);
 }
}
function explanation(){
 window.open(href=url[page],"remote","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=350,height=375");
}
function setCookie(NameOfCookie, answer, expiredays){
 var ExpireDate = new Date();
 ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 1 * 3600 * 1000));
  document.cookie = NameOfCookie + "=" + escape(answer) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}
function getCookie(NameOfCookie){
 if (document.cookie.length > 0) {              
  begin = document.cookie.indexOf(NameOfCookie+"=");       
  if (begin != -1) {           
   begin += NameOfCookie.length+1;       
   end = document.cookie.indexOf(";", begin);
   if (end == -1) end = document.cookie.length;
          return unescape(document.cookie.substring(begin, end));
      } 
   }
return null;
}
function showResult(){
 if(currCount==0){
  window.open("http://www.sacc.to/sya/myths/quiz/startQuiz.htm","result","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=450,height=310");
 }
 else {
  window.open("http://www.sacc.to/sya/myths/showResults.htm","result","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=450,height=400");
 }
}
//-->