totalGuess = 0
totalCorrect = 0

myPix = new Array("images/testcircle2.gif","images/testplus2.gif","images/testsquare2.gif","images/testsquiggly2.gif","images/teststar2.gif")
imgCt = myPix.length

function espTest(guess)
{
   if (document.images)
   {
      randomNum = Math.floor ((Math.random() * imgCt))
	  document.myPicture.src = myPix[randomNum]
   }
   
   if (randomNum == guess)
   {
      totalGuess++
	  totalCorrect++
   }
   else
   {
      totalGuess++
   }
   
   setTimeout("swap()",1*1000)
   
   if(totalGuess == 25)
   {
      message = "This score is chance."
	  if (totalCorrect <= 7)
	  {
	     message = "This score is not significant."
	  }
	  else if (totalCorrect <= 12)
	  {
	     message = "This score is slighly significant."
	  }
	  else if (totalCorrect <= 19)
	  {
	     message = "This score is highly significant."
	  }
	  else
	  {
	     message = "You must be psychic! That's an incredible score!"
	  }
	  if (confirm("You have completed the deck. Out of a total 25 cards, you correctly guessed " +  totalCorrect + ". " + message + " Would you like to play agan?"))
	  {
         window.location="onlineesp.html"
	  }
   }
}

function swap()
{
   document.myPicture.src="images/testesp.jpg"
}

