//========================================================================
//   "MemorySquares" JavaScript Memory Game
//
//   Copyright (C) 2000,2001  Jan Mulder
//
//   This program is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; either version 2 of the License, or
//   (at your option) any later version, and as long as this notice is
//   kept unmodified at the top of the JavaScript source code.
//
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License (license.txt) for more details.
//
//   Contact: Jan Mulder info@EnglishCafe.co.uk
//
//=======================================================================

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();
   }	   
}

var imageWidth = 60;
var imageHeight = 60;
var delay = 0;
var doneAction   = "wellDone();";

var matchingPairs = new Array(
"la1.gif", "la1.gif",
"la2.gif", "la2.gif",
"la3.gif", "la3.gif",
"la4.gif", "la4.gif",
"la5.gif", "la5.gif",
"la6.gif", "la6.gif",
"la7.gif", "la7.gif",
"la8.gif", "la8.gif"
);
