For the following page www.estudiode.es I have to change the background image of the main table each time I load the page (index)..I don't know very much js but I've found the following script that do the image swapt each time it loads but not in the table background, just in the page background.
Please can you tell me what I have to change in the script for doing the image change inside <table> </table>?

Thank you very much,


<SCRIPT language="JavaScript">

<!-- Begin JS Script -->

<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'http://www.estudiode.es/imagenes/imgcambio/img1.jpg'
theImages[1] = 'http://www.estudiode.es/imagenes/imgcambio/img2.jpg'
theImages[2] = 'http://www.estudiode.es/imagenes/imgcambio/img3.jpg'
theImages[3] = 'http://www.estudiode.es/imagenes/imgcambio/img4.jpg'
theImages[4] = 'http://www.estudiode.es/imagenes/imgcambio/img5.jpg'

// do not edit anything below this line

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));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');

// End -->

<SCRIPT language="JavaScript">
<!-- Begin
// End -->