//  The numbers in the next line determine the location of the instructions (vertical, horizontal, width, )  

/*GetDiv("Hints",-100,295,200,4,2,100,100)
document.write("<font color=#000000><p>&nbsp;<p>&nbsp;<p>&nbsp;<p>&nbsp<p>&nbsp;<p>&nbsp;<p>&nbsp<p>&nbsp;<p>&nbsp;<p>&nbsp<p>&nbsp;<p>&nbsp;<p>&nbsp<p>&nbsp;<p>")
document.write("<b><p><font color=#000000><big><u>Bible Books Wordsearch</u></big></b><br>")
document.write("<b>There is a name of a Bible book at the bottom of the grid of letters to the right.&nbsp;&nbsp;</b>")
document.write("<b>Look for this Bible book in the grid.&nbsp;&nbsp;</b>")
document.write("<b>When you have found it (which could be spelled forwards, backwards, downwards or upwards), click on the first letter of it.</b>&nbsp;&nbsp;")
document.write("<b>You have 45 seconds and 3 guesses.<b>&nbsp;&nbsp;&nbsp</font><font color=yellow>Have Fun</b></font></b>")
EndDiv()*/

Words=new Array(
"GENESIS","EXODUS","LEVITICUS","NUMBERS","DUETERONOMY","JOSHUA","JUDGES",
"RUTH","EZRA","NEHEMIAH","ESTHER","JOB","PSALMS","PROVERBS",
"ISAIAH","JEREMIAH","EZEKIEL","DANIEL","HOSEA","JOEL","AMOS","OBADIAH",
"JONAH","MICAH","NAHUM","HABAKKUK","ZEPHANIAH","HAGGAI","ZECHARIAH",
"MALACHI","MATTHEW","MARK","LUKE","JOHN","ACTS","ROMANS",
"GALATIANS","EPHESIANS","COLOSSIANS","TITUS","PHILEMON","HEBREWS","JAMES",
"JUDE","REVELATION"
)

function PickOneOf(Ar){                                          
if(Ar.length<1)location.reload()
ran=Math.floor(Ar.length*Math.random())
pickedWord=Ar[ran]
Fst=Ar.slice(0,ran)
Snd=Ar.slice(ran+1)
Words=Fst.concat(Snd)
return pickedWord
}


Characs=new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
Letter=new Array()
Comms=new Array("Two","One","No")


//  The numbers in the next line determine the location of the word to find (vertical, horizontal, width, )

GetDiv("Quest",10,10,400,40,'',1,0)
document.write("<font color=white><center>Please wait...</center></font>")
EndDiv()

for(ix=0;ix<10;ix++){
	
	GetDiv("Real"+ix,300,0,20,20,'black',0,2)
	document.write(".")
	EndDiv()
}

//   ************* 
//   The first number in the fourth line that follows determines the vertical position of the grid
//   The third number in the fourth line that follows determines the horizontal positon of the grid



n=0
for(colY=0;colY<10;colY++){
	for(rowX=0;rowX<10;rowX++){
		GetDiv("Note"+n,40+colY*41,40+rowX*41,40,40,'black',1,1);
		
		document.write("")
		EndDiv()
		n++
	}
}



SDirs=new Array(-1,1,-10,10)

function GetList(visby){
ShowHide('List',visby)
}

function Shuffle(ArrayX){
Ar=ArrayX
shuf=new Array()
x=0
while(x<ArrayX.length){
ran=Math.floor(Ar.length*Math.random())
shuf[x]=Ar[ran]
Fst=Ar.slice(0,ran)
Snd=Ar.slice(ran+1)
Ar=Fst.concat(Snd)
x++
}
return shuf
}

function GetIt(L){
if(Game==1)return
Wins=0
Sols=new Array()
for(sol=0;sol<2;sol++){
Sols[sol]=""
for(i=0;i<SecW.length;i++){
Sols[sol]+=(Math.floor((L+i*SDirs[sol])/10)==Math.floor(L/10)&&Letter[L+i*SDirs[sol]])?Letter[L+i*SDirs[sol]]:""
}
}
for(sol=2;sol<4;sol++){
Sols[sol]=""
for(i=0;i<SecW.length;i++){
Sols[sol]+=(Letter[L+i*SDirs[sol]])?Letter[L+i*SDirs[sol]]:""
}
}
Testers=""
for(sol=0;sol<4;sol++){
Testers+="\n"+Sols[sol]+" ?"
if(Sols[sol]==SecW)Wins=1
}

if(Wins==1||L==theHead){
alert("VERY GOOD  -  You Found It!")
GameOver()
}
else{
alert("Hmmm...Let's see...\n"+Testers+" \n\n.... Sorry!\n\nWe're looking for\n"+SecW+" !\n"+Comms[Guess]+" more guesses!")
Guess++
if(Guess>2)GameOver()
}
}

function Timer(){
tim++
window.status=tim
if(tim>45){
alert("Sorry your time has run out.")
GameOver()
}
}

function GameOver(){
clearInterval(GameTimer)
for(i=0;i<SecW.length;i++){
PutIt("Real"+i,Xof("Note"+parseInt(StPt+i*Incr)),Yof("Note"+parseInt(StPt+i*Incr)))
ShowHide("Real"+i,1)
}
Game=1
DivWrite("Quest","<font size=5 color=white>Game is Over! <a href=# onclick='Init()'>Play again.</a></font>")
}



