/* -----------------------------------

        tarot_client_shuffle.js
    (client ftns for shuffling deck, 
         including the animations)

	(c) 2001, visionary networks
		any questions? ask jewel mlnarik 
		(jewel@tarot.com)

--------------------------------------- */ 

if( IMAGE_BASE_PATH == "" ){
  var IMAGE_SRC = "/";
  //document.write("base path: / <BR>");
}else{
  var IMAGE_SRC = IMAGE_BASE_PATH;
  //document.write("base path: "+IMAGE_SRC+" <BR>");
}

if ( document.images ) {
	shuffling = new Image();
	shuffling.src = IMAGE_SRC + "tarot/images/layout/expert/hands-shuffle.gif";
	stillshuffle = new Image(); 
	stillshuffle.src = IMAGE_SRC + "tarot/images/layout/expert/hands.gif";
	animatefan = new Image();
	animatefan.src = IMAGE_SRC + "tarot/images/layout/expert/fan2-shuffle.gif";
	stillfan = new Image();
	stillfan.src = IMAGE_SRC + "tarot/images/layout/expert/fan2.jpg";
}

function chgImg(FieldImg, newImage)  
//rollover function FI is name of img to be changed
{
  if (document.images)  document[FieldImg].src = eval(newImage + ".src");
}

function startShuffle(groupObj){
	groupObj.shuffle_start();
	chgImg('fan', 'animatefan');
	chgImg('shufflespot', 'shuffling');
}

function stopShuffle(groupObj){
	var stopTime = new Date();
	groupObj.shuffle_stop( stopTime );
	chgImg('shufflespot', 'stillshuffle');
	chgImg('fan', 'stillfan');
}
