per la prima, metti in cima al javascript o fuori dalle funzioni questa riga di codice:
codice:
document.getElementById('c1').style.background = "url(immagine.gif)";
oppure metti l'immagine di sfondo direttamente nel tag <table>
-la seconda non l'ho capita bene, vorresti ritardare il caricamento delle altre 9 immagini e fare il preload solo della prima se è così prova a modificare il codice così:
codice:
rotator = true;
n = 0;
theImages = "0.gif, 1.gif, 2.gif, 3.gif, 4.gif, 5.gif, 6.gif, 7.gif, 8.gif, 9.gif".split(", ");
allImages = theImages.length;
imgObjects = new Array();
imgObjects[0] = new Image();
imgObjects[0].src = theImages[0];
function load(){
for (i in theImages){
imgObjects[i] = new Image();
imgObjects[i].src = theImages[i];
}
}
window.setTimeout(load, 30000) //30 secondi
function rotate(direction){
n++;
if (n==allImages) n = 0;
document.getElementById('c1').style.background = "url(" + imgObjects[n].src + ")";
}
window.setInterval(rotate, 60000); //60 secondi