In the head, you'll need to paste the following code:
<script type="text/javascript" language="JavaScript">
document.getElementById("mainImage").setAttribute("src",
MyImages[Math.round(Math.random()*3)])
You'll obviously need to change the file names to what ever files you want to load.
In the <body> tag, you'll also need to add onload="newImage()", so you get something like
<body onload="newImage()">
Finally, you need to make sure that you have an image with an ID of "mainImage" on your page
somewhere. If you don't, you'll get JavaScript errors.