
var theImages = new Array()

theImages[0] = 'imagenes/encabezado_home_01.jpg'
theImages[1] = 'imagenes/encabezado_home_02.jpg'
theImages[2] = 'imagenes/encabezado_home_03.jpg'
theImages[3] = 'imagenes/encabezado_home_04.jpg'
theImages[4] = 'imagenes/encabezado_home_05.jpg'
theImages[5] = 'imagenes/encabezado_home_06.jpg'
theImages[6] = 'imagenes/encabezado_home_07.jpg'
theImages[7] = 'imagenes/encabezado_home_08.jpg'
theImages[8] = 'imagenes/encabezado_home_09.jpg'
theImages[9] = 'imagenes/encabezado_home_10.jpg'
theImages[10] = 'imagenes/encabezado_home_01.jpg'
theImages[11] = 'imagenes/encabezado_home_12.jpg'
theImages[12] = 'imagenes/encabezado_home_13.jpg'
theImages[13] = 'imagenes/encabezado_home_14.jpg'
theImages[14] = 'imagenes/encabezado_home_15.jpg'
theImages[15] = 'imagenes/encabezado_home_16.jpg'
theImages[16] = 'imagenes/encabezado_home_17.jpg'
theImages[17] = 'imagenes/encabezado_home_18.jpg'
theImages[18] = 'imagenes/encabezado_home_19.jpg'
theImages[19] = 'imagenes/encabezado_home_20.jpg'
theImages[20] = 'imagenes/encabezado_home_21.jpg'

var j = 0
var p = theImages.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

