You don't need images - you could use the HTML codes.
&hearts &clubs &diams &spades
Shuffle is probably a bit advanced for you at this stage, but
Code:
<script type = "text/javascript">
var imgArray = new Array('Ace',2,3,4,5,6,7,8,9,10,'Jack','Queen','King');
Array.prototype.shuffle = function() {
var s = [];
while (this.length) s.push(this.splice(Math.random() * this.length, 1));
while (s.length) this.push(s.pop());
return this;
}
imgArray.shuffle();
var card1 = imgArray[0];
alert (card1);
imgArray.shuffle();
var card2 = imgArray[0];
alert (card2);
if (card1 == card2) {
alert ("The cards match!");
}
</script>