i want to create a random card picker and this script works great for me. but how can i add clickable links to cards after they are generated randomly? i want the new image generated in the same place where 0.jpg is when button is clicked exactly like in the script, but with a clickable link on it. i couldnt manage to add links to the images.
thanks in advance
-----------------------------------
<script language="javascript">
<!-- Begin
function show(){
var theImages = new Array()
theImages[0] = 'deck/card1.jpg'
theImages[1] = 'deck/card2.jpg'
theImages[2] = 'deck/card3.jpg'
theImages[3] = 'deck/card4.jpg'
theImages[4] = 'deck/card5.jpg'
theImages[5] = 'deck/card6.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
document.picture.src = theImages[whichImage];
}// End -->
</script>
<img src="deck/0.jpg" name="picture" />
<form>
<input type="button" value="pick a card" onclick="show()">
</form>



