ctr=0;
/* Put the title of your test here, just as you want it to appear on screen. */
ttl="Who was Abraham, David & King Saul"

/* Now, what is a perfect score? Although it will usually be 100, you can alter 
   it if you wish. However, it may not exceed 999 and must be a whole number. */
psco=100;

/* Deduction for each wrong answer. May be the perfect score divided by the
   number of questions.  But if you "weight" wrong answers, as we have done in this
   little demo script, it may be higher, but must be a whole number.  */
wrans=5;

/* Deduction for each "no answer". Usually this will be the simple arithmetical
   perfect score divided by number of questions. (A whole number) However, again, you are in charge. */
noans=5;

/* Change "nr" below to be equal to the number of questions you have on this test. (Our demo has 5 questions) */
nr=20;

/* Simply replace the "questions" below with the ones you wish to use for this test. If
   you wish more than 5 questions, simply add ques[5], ques[6], etc. But be sure that the
   "nr" just above is changed to reflect the actual number of questions you have
   prepared.  NOTE: do not use any double quote signs in your questions.  If you
   need them, use the HTML &quot; instead. Or, single quote signs may be safely used. */
ques=new Array();
ques[0]="1. Where was Abraham born? (See: Genesis 11:26-28)";
ques[1]="2. What was Abraham's first wife's name? (See: Genesis 11:29)";
ques[2]="3. What relation was Lot to Abraham? (See: Genesis 14:12)";
ques[3]="4. What mountain did Abraham go to, to sacrifice Isaac? (See: Genesis 22:2)";
ques[4]="5. What promise did God make Abraham regarding Ishmael, his son to Hagar? (See: Genesis 17:20)";
ques[5]="6. For which city did Abraham intercede with God to try to avoid it's destruction? (See: Genesis 18:16-33)";
ques[6]="7. Which of David's sons tried to overthrow and kill him? (See: 2 Samuel 15:14)";
ques[7]="8. Who refused to assist David and his men, and died as a result? (See: 1 Samuel 25:38)";
ques[8]="9. Which former King of Israel tried to kill David out of envy? (See: 1 Samuel 19:2)";
ques[9]="10. Who was the Prophet that confronted David with his adultery? (See: 2 Samuel 12:1)";
ques[10]="11. What was the cost of David's sin with Bathsheba? (See: 2 Samuel 12:15-19)";
ques[11]="12. After Absalom rebelled against King David, who did Absalom appoint as commander over his army in Joab`s place? (See: 2 Samuel 17:25)";
ques[12]="13. How did David's son Absalom die? (See: 2 Samuel 18:14)";
ques[13]="14. Who was crippled son of Jonathan who was given a permanent place at King David`s royal table? (See: 2 Samuel 9:11)";
ques[14]="15. How many years did David rule as king of Israel? (See: 1 Chronicles 29:26,27)";
ques[15]="16. Who was the wife of King Saul? (See: 1 Samuel 14:50)";
ques[16]="17. Who was the captain of King Saul's army? (See: 1 Samuel 14:50)";
ques[17]="18. King Saul disobeyed God and spared what Amalekite king? (See: 1 Samuel 15:9)";
ques[18]="19. Who was the Philistine king of Gath to whom David fled twice for protection from Saul's wrath? (See: 1 Samuel 27:2)";
ques[19]="20. What musical instrument would soothe King Saul's spirit? (See: 1 Samuel 16:23)";

// add as many questions as you wish here

/* Now the tedious part.  You must put the letter equivalent for each correct answer
   (a, b, c, d, or e) in order in a row for your particular test.  As you can see below, I've done so for the demo test. */
cor="adbcabcddcbaaccbbdda";

/* When entering your own answers, do not use any double quote signs in your 
   answers.  Instead, use the HTML &quot; so the JS will not get confused. */
ans=new Array();
ans[0]="Ur";
ans[1]="Canaan";
ans[2]="Egypt";
ans[3]="Uz";

ans[4]="Dinah";
ans[5]="Rebecca";
ans[6]="Beulah";
ans[7]="Sarah";

ans[8]="Son";
ans[9]="Nephew";
ans[10]="Uncle";
ans[11]="Brother";
	  
ans[12]="Mount Sinai";
ans[13]="Mount Gilead";
ans[14]="Mount Moriah";
ans[15]="Mount Hermon";

ans[16]="All of the above";
ans[17]="He would beget 12 kings";
ans[18]="He would bear a multitude";
ans[19]="He would be blessed";

ans[20]="Babylon";
ans[21]="Sodom";
ans[22]="Beth Shemesh";
ans[23]="Jerusalem";

ans[24]="Solomon";
ans[25]="Adrendam";
ans[26]="Absalom";
ans[27]="Abimelech";

ans[28]="Eleazar";
ans[29]="Saul";
ans[30]="Abimelech";
ans[31]="Nabal";
	   
ans[32]="Joash";
ans[33]="Solomon";
ans[34]="Ahab";
ans[35]="Saul";

ans[36]="Samuel";
ans[37]="Elisha";
ans[38]="Nathan";
ans[39]="Elijah";

ans[40]="A lamb sacrifice";
ans[41]="Their first born would die";
ans[42]="They could never marry";
ans[43]="Repent in sackcloth and ashes";

ans[44]="Amasa";
ans[45]="Abiathar";
ans[46]="Abner";
ans[47]="Abishai";

ans[48]="Three darts thrust into his heart";
ans[49]="Caught in a tree by his hair";
ans[50]="His head was cut off by a Philistine";
ans[51]="Killed by his own captain";

ans[52]="Maacah";
ans[53]="Hephzibah";
ans[54]="Mephibosheth";
ans[55]="Abishai";

ans[56]="10";
ans[57]="30";
ans[58]="40";
ans[59]="60";

ans[60]="Michal";
ans[61]="Ahinoam";
ans[62]="Bathsheba";
ans[63]="Zobah";

ans[64]="Amasa";
ans[65]="Abner";
ans[66]="Joab";
ans[67]="Ahinoam";

ans[68]="Dagon";
ans[69]="Shur";
ans[70]="Balak";
ans[71]="Agag";

ans[72]="Abishai";
ans[73]="Ziklag";
ans[74]="Jachin";
ans[75]="Achish";

ans[76]="Harp";
ans[77]="Horn";
ans[78]="Pipe";
ans[79]="Timbrel";

// Continue adding answers here

ns="0123456789101112131415"
ls="abcd";
astr="";
ack=new Array();
for (var i=0;i<nr;i++){
 ack[i]=(nr*4)+1;
 }

function lightIt(){
 document.images[flg+ad].src="rbl.gif";
 }
function dimIt(){
 if (ack[Math.floor(flg/4)]!=flg){
  document.images[flg+ad].src="rbd.gif";
  }
 }
function dumpIt(){
 if (ack[Math.floor(flg/4)]==flg){
  document.images[ack[Math.floor(flg/4)]+ad].src="rbd.gif";
  ack[Math.floor(flg/4)]=(nr*4)+1;
  }
 else{
  if (ack[Math.floor(flg/4)]!=flg&&ack[Math.floor(flg/4)]!=(nr*4)+1){
   document.images[ack[Math.floor(flg/4)]+ad].src="rbd.gif";
   }
  document.images[flg+ad].src="rbl.gif";
  ack[Math.floor(flg/4)]=flg;
  }
 }
function ckSco(){
 document.images[ad+(nr*4)].src="cwf2.gif";
 setTimeout('document.images[ad+(nr*4)].src="cwf0.gif"',1000);

 for (var i=0;i<nr;i++){
  u=cor.charAt(i);
  v=ls.indexOf(u)+(i*4);
  document.images[ad+v].src="gbl.gif";
  }
 sco=psco;
 for (var i=0;i<nr;i++){
  if (ack[i]==(nr*4)+1){
   sco-=noans;
   }
  else{
   u=cor.charAt(i);
   v=ls.indexOf(u)+(i*4);
   sco=(v==ack[i]?sco:sco-wrans);
   }
  }
 sco=(sco<0?0:sco); // prevent minus score
 scos=""+sco;
 while (scos.length<3){
  scos="0"+scos;
  }
 document.images[ad+(nr*4)+1].src="yts.gif";
 ctr=ad+(nr*4)+2;
 for (var i=0;i<3;i++){
  nj=ns.indexOf(scos.charAt(i));
  document.images[ctr].src=nj+".gif";
  ctr++;
  }
 }
function litbut(){
 document.images[ad+(nr*4)].src="cwf1.gif";
 }
function dimbut(){
 document.images[ad+(nr*4)].src="cwf0.gif";
 }
/* This little routine is simply used to count the number of images you may place on your web page
   prior to the radio buttons.  Just makes the routine independent of how you lay your page out. */
var ad = 0;
function getImgAdd(){
 for (var i=0;i<20;i++){
  if (document.images[i].src.indexOf("rbd.gif")>-1){
   ad=i;
   i=20;
   }
  }
 }

