//Imágenes aleatorias con links
//Nótese que el índice del arreglo va hasta n_images-1
var n_images   = 6; 
var imgs = new Array(n_images);
imgs[0] = "http://www.presentacionesweb.com/images/admin/ecuador.gif";
imgs[1] = "http://www.multiprograma.net/images/banner1a.gif";
imgs[2] = "http://www.presentacionesweb.com/images/admin/apuntesmedicos2.jpg";
imgs[3] = "http://www.multiprograma.net/images/banner2.gif";
imgs[4] = "http://www.presentacionesweb.com/images/admin/fotos.jpg";
imgs[5] = "http://www.presentacionesweb.com/images/admin/ecuaext.jpg";

//Nótese que el índice del arreglo va hasta n_links-1
var n_links = 6; 
var links = new Array(n_links);
links[0] = "http://www.fiebreamarilla.net";
links[1] = "http://www.multiprograma.net/members/cindy03";
links[2] = "http://www.apuntesmedicos.net";
links[3] = "http://www.multiprograma.net/members/cindy03"
links[4] = "http://www.felixman.com/fotos/fotos.htm"
links[5] = "http://www.ecuadorextremo.com"
//Selecciono al azar la imagen
var randomimage = Math.floor(Math.random() * n_images);

//Selecciono al azar la dirección
var randomlink = Math.floor(Math.random() * n_links);

document.write("<a href='" + links[randomlink] + "' >");
document.write("<img src='" + imgs[randomlink] + "' ")
//Aquí cambio el tamaño de la imagen
document.write("width=468 height=60");
document.write("></a>");

//Ahora hay que colocar lo siguiente en la página:
//<script src="random_img_link.js"></script>