// banner.js

//creo array de imágenes
//creo array de imágenes
array_imagen = new Array(10)
array_imagen[0] = new Image(978,240)
array_imagen[0].src = "images/imgrot1.jpg"
array_imagen[1] = new Image(978,240)
array_imagen[1].src = "images/imgrot2.jpg"
array_imagen[2] = new Image(978,240)
array_imagen[2].src = "images/imgrot3.jpg"
array_imagen[3] = new Image(978,240)
array_imagen[3].src = "images/imgrot4.jpg"
array_imagen[4] = new Image(978,240)
array_imagen[4].src = "images/imgrot5.jpg"
array_imagen[5] = new Image(978,240)
array_imagen[5].src = "images/imgrot6.jpg"
array_imagen[6] = new Image(978,240)
array_imagen[6].src = "images/imgrot7.jpg"
array_imagen[7] = new Image(978,240)
array_imagen[7].src = "images/imgrot8.jpg"
array_imagen[8] = new Image(978,240)
array_imagen[8].src = "images/imgrot9.jpg"
array_imagen[9] = new Image(978,240)
array_imagen[9].src = "images/imgrot10.jpg"


//creo el array de URLs
array_url = new Array(10)
array_url[0] = "#"
array_url[1] = "#"
array_url[2] = "#"
array_url[3] = "#"
array_url[4] = "#"
array_url[5] = "#"
array_url[6] = "#"
array_url[7] = "#"
array_url[8] = "#"
array_url[9] = "#"

//variable para llevar la cuenta de la imagen siguiente
contador = 0

//función para rotar el banner
function alternar_banner(){
	window.document["banner"].src = array_imagen[contador].src
	window.document.links[0].href = array_url[contador]
	contador ++
	contador = contador % array_imagen.length
	setTimeout("alternar_banner()",3000)
}

