1/* ARRAY DE IMAGENES */
2ads = new Array(9);
3ads[0] = "https://jarroba.com/wp-content/uploads/2012/03/Modelado.png";
4ads[1] = "https://jarroba.com/wp-content/uploads/2012/03/LenguajesProgramacion.png";
5ads[2] = "https://jarroba.com/wp-content/uploads/2012/03/AplicacionesMoviles.png";
6ads[3] = "https://jarroba.com/wp-content/uploads/2012/03/TecnologiaWeb.png";
7ads[4] = "https://jarroba.com/wp-content/uploads/2012/03/Servidores.png";
8ads[5] = "https://jarroba.com/wp-content/uploads/2012/03/SistemasOperativos.png";
9ads[6] = "https://jarroba.com/wp-content/uploads/2012/03/BaseDeDatos.png";
10ads[7] = "https://jarroba.com/wp-content/uploads/2012/03/Hadware.png";
11ads[8] = "https://jarroba.com/wp-content/uploads/2012/03/InteligenciaArtificial.png";
12
13/* ARRAY DE URLs */
14arrayURLs = new Array(9);
15arrayURLs[0] = "https://jarroba.com/indice-ingenieria-del-software/"
16arrayURLs[1] = "https://jarroba.com/lenguajes-de-programacion/"
17arrayURLs[2] = "https://jarroba.com/aplicaciones-moviles/"
18arrayURLs[3] = "https://jarroba.com/tecnologias-web/"
19arrayURLs[4] = "https://jarroba.com/redes/"
20arrayURLs[5] = "https://jarroba.com/sistemas-operativos/"
21arrayURLs[6] = "https://jarroba.com/bases-de-datos/"
22arrayURLs[7] = "https://jarroba.com/diseno-hardware/"
23arrayURLs[8] = "https://jarroba.com/inteligencia-artificial/"
24
25//variable para llevar la cuenta de las imagenes
26var longuitudArray = ads.length;
27var contador = 0
28
29// Cojemos un numero aleatorio
30contador = Math.floor((Math.random() * longuitudArray))
31
32// Cambia la imagen cada segundo en este ejemplo
33var tiempo = 1// En segundos
34var timer = tiempo * 1000;
35
36function banner() {
37 contador++;
38 contador = contador % longuitudArray
39 document.banner.src = ads[contador];
40 setTimeout("banner()", timer);
41}
42
43function ponerURL() {
44 contador2 = contador;
45 url = window.open(arrayURLs[contador2]);
46 return false;
47}