function wellDone()
{
  if (timeLeft > 0)
  {
    if (
       confirm(
       'Well done! You took '
       + numMinutes
       + ' minutes and '
       + numSeconds
       + ' seconds to complete the game using '
       + numAttempts
       + ' attempts. Do you want to try again?')
       ) location.reload();
  }   
  else
  {
    if (
       confirm(
       'Bad luck! You ran out of time, but you managed to get '
	   + numCorrect
	   + ' out of '
	   + numImages
       + ' right. Do you want to try again?')
       ) location.reload();
   }	   
}

/*
Here is the data for the game. It must go BEFORE the game script "mpairs.js".
ALL variables MUST be present even if they don't have a value.

"imageWidth" and "imageHeight" contain  the size of the images. All the images
should be the same size.

"delay" determines how long the image pairs are displayed.
If set to "0" they will only disappear when the cursor moves away from the
currently visible images.

"doneAction" is the name of the function to be called when the game is over.
This can also be no action: doneAction = "":
You can provide you own function somewhere in a script such as in the example
above, or you can just use a simple inline one:
doneAction = "alert('Well done! Now have a cup of tea.');";

The variable you can use in a function are: 
numCorrect, numWrong, numAttempts, numMinutes, numSeconds, timeLeft

"matchingPairs" is an array containing all the images in matching pairs.
There is always an even number of images and matching images should be placed
next to each other:

"bulb.gif", "txt_bulb.gif", "socket.gif", "txt_socket.gif",...

NOT

"bulb.gif", "socket.gif", "txt_bulb.gif", "txt_socket.gif",...

Apart from that they can be in any order you like because they placed in random
order in the grid every time a new game starts.

*/

var imageWidth = 130;
var imageHeight = 90;
var delay = 0;
var doneAction   = "wellDone();";

var matchingPairs = new Array(
"/templates/cuvcontent_kids_inside/games/concen/dime.gif", "/templates/cuvcontent_kids_inside/games/concen/dime2.gif",
"/templates/cuvcontent_kids_inside/games/concen/fivedollars.gif", "/templates/cuvcontent_kids_inside/games/concen/fivedollars2.gif",
"/templates/cuvcontent_kids_inside/games/concen/nickel.gif", "/templates/cuvcontent_kids_inside/games/concen/nickel2.gif",
"/templates/cuvcontent_kids_inside/games/concen/onedollar.gif", "/templates/cuvcontent_kids_inside/games/concen/onedollar2.gif",
"/templates/cuvcontent_kids_inside/games/concen/penny.gif", "/templates/cuvcontent_kids_inside/games/concen/penny2.gif",
"/templates/cuvcontent_kids_inside/games/concen/quarter.gif", "/templates/cuvcontent_kids_inside/games/concen/quarter2.gif",
"/templates/cuvcontent_kids_inside/games/concen/tendollars.gif", "/templates/cuvcontent_kids_inside/games/concen/tendollars2.gif",
"/templates/cuvcontent_kids_inside/games/concen/twentydollars.gif", "/templates/cuvcontent_kids_inside/games/concen/twentydollars2.gif"
);

