Please can some one help me, i am creating a simon says game, so far i have got the image (there are 4 each with a day and night version) to react to been clicked (when clicked it changes to the day version and reverts back to the original been the night version, i used the onclick event and a timer) now i want one of the images to randomly flash when the page loads, i know i will need the onload event but i am not sure how i will use it. Does anyone know? PLEASE. Here is what i have so far

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Simon Says Game</title>

<style type="text/css">
body {
background-color : black;
}

table {
margin-left: auto;
margin-right: auto;
width:900px;
height:530px;
}

img {
width:450px;
height:225px;
}

#a{}

#b{}

#c{}

#d{}

tr{
width:900px;
height:225px;
}
td{
width:450px;
height:225px;
}

#label {
width : 450px;
height : 82px;
background-color : #404040;
position: absolute;
top : 480px;
left : 0 px;
font-family: arial;
font-weight: bold;
font-size: 25px;
text-align: center;
background-image:
url('blue.gif');
}


</style>
<script type="text/javascript">

function flash(obj,newImg){

oldImg = obj.src;
obj.src=newImg;
window.setTimeout(function(){obj.src=oldImg},300);
}

function ran() {
var flash = 4 + parseInt(4*Math.random());
flash();
}

</script>

</head>

<body onload="ran (this,'a')">
<table border="1">
<tr>
<td><div id="a"><img src="1night.jpg" onclick="flash(this,'1day.jpg')"></div>
</td>
<td><div id="b"><img src="2night.jpg" onclick="flash(this,'2day.jpg')"></div></td>
</tr>
<tr>
<td><div id="c"><img src="3night.jpg" onclick="flash(this,'3day.jpg')"></div></td>
<td><div id="d"><img src="4night.jpg" onclick="flash(this,'4day.jpg')"></div></td>
</tr>
<tr>
<td>
<div id="label">Retry</div>
</td>
<td>
<div id="label">Score: 0</div>
</td>
</tr>
</table>
</body>
</html>