Hola otra vez:
Un arreglo sencillo es tal como te dije, crear un array con los enlaces, para el ejemplo usé los mismos valores que las imágenes:
Código PHP:
var enlaces = [
"http://www.sucaricatura.com/2002/maxi/2002H001.jpg",
"http://www.sucaricatura.com/2002/mini/2002H002.jpg",
"http://www.sucaricatura.com/2002/maxi/2002H003.jpg",
"http://www.sucaricatura.com/2002/mini/2002H004.jpg",
"http://www.sucaricatura.com/2002/maxi/2002H005.jpg",
"http://www.sucaricatura.com/2002/mini/2002H006.jpg",
"http://www.sucaricatura.com/2002/maxi/2002H007.jpg"
];
Luego puse unos links con sus "id" junto a las imágenes:
<a href="" id=enlace1>
<img src="" name=imagen1>
</a>
<a href="" id=enlace2>
<img src="" name=imagen2>
</a>
<a href="" id=enlace3>
<img src="" name=imagen3>
</a>
<a href="" id=enlace4>
<img src="" name=imagen4>
</a>
y por último 4 nuevas lineas en la función de inicialización:
Código PHP:
document.getElementById("enlace1").href = enlaces[temp[0]];
document.getElementById("enlace2").href = enlaces[temp[1]];
document.getElementById("enlace3").href = enlaces[temp[2]];
document.getElementById("enlace4").href = enlaces[temp[3]];
Saludos