var theImages = new Array()
var theImagesSm = new Array()

//Random-loading images
theImages[0] = 'imagenes2/slides/mapaMegaPlaza.jpg' // replace with names of images
theImages[1] = 'imagenes2/slides/mapaCuzco.jpg' // replace with names of images
theImages[2] = 'imagenes2/slides/mapaArequipa.jpg' // replace with names of images
theImages[3] = 'imagenes2/slides/mapaMegaPlaza.jpg' // replace with names of images

//Creado
theImagesSm[0] = 'imagenes2/slides/sm/cusco.gif' // replace with names of images
theImagesSm[1] = 'imagenes2/slides/sm/iquitos.gif' // replace with names of images
theImagesSm[2] = 'imagenes2/slides/sm/lamolina.gif' // replace with names of images
theImagesSm[3] = 'imagenes2/slides/sm/miraflores.gif' // replace with names of images
theImagesSm[4] = 'imagenes2/slides/sm/tumbes.gif' // replace with names of images
theImagesSm[5] = 'imagenes2/slides/sm/cajamarca.gif' // replace with names of images
theImagesSm[6] = 'imagenes2/slides/sm/trujillo.gif' // replace with names of images

var j_ = 0
var p_ = theImages.length;
var preBuffer = new Array()

//Creado
var j_Sm = 0
var p_Sm = theImagesSm.length;
var preBufferSm = 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));

//Creado
for (iSm = 0; iSm < p_Sm; iSm++){
preBufferSm[iSm] = new Image()
preBufferSm[iSm].src = theImagesSm[i]
}
var whichImageSm = Math.round(Math.random()*(p_Sm-1));

function showImage_(){
if(whichImage==0){
document.write('<a href ="buscador.asp?dep=07"><img src="'+theImages[whichImage]+'" border=0 width=350 height=253></a>');
}
else if(whichImage==1){
document.write('<a href ="buscador.asp?dep=07"><img src="'+theImages[whichImage]+'" border=0 width=350 height=253></a>');
}
else if(whichImage==2){
document.write('<a href ="buscador.asp?dep=07"><img src="'+theImages[whichImage]+'" border=0 width=350 height=253></a>');
}
else if(whichImage==3){
document.write('<a href ="buscador.asp?dep=07"><img src="'+theImages[whichImage]+'" border=0 width=350 height=253></a>');
}
else if(whichImage==4){
document.write('<a href ="buscador.asp?dep=07"><img src="'+theImages[whichImage]+'" border=0 width=350 height=253></a>');
}
}

//Creado
function showImage_Sm(){
if(whichImageSm==0){
document.write('<a href ="buscador.asp?dep=08"><img src="'+theImagesSm[whichImageSm]+'" border=0 width=230 height=215></a>');
}
else if(whichImageSm==1){
document.write('<a href ="buscador.asp?dep=16"><img src="'+theImagesSm[whichImageSm]+'" border=0 width=230 height=215></a>');
}
else if(whichImageSm==2){
document.write('<a href ="buscador.asp?dep=07&prov=&dist=150114"><img src="'+theImagesSm[whichImageSm]+'" border=0 width=230 height=215></a>');
}
else if(whichImageSm==3){
document.write('<a href ="buscador.asp?dep=07&prov=&dist=150122"><img src="'+theImagesSm[whichImageSm]+'" border=0 width=230 height=215></a>');
}
else if(whichImageSm==4){
document.write('<a href ="buscador.asp?dep=24"><img src="'+theImagesSm[whichImageSm]+'" border=0 width=230 height=215></a>');
}
else if(whichImageSm==5){
document.write('<a href ="buscador.asp?dep=06"><img src="'+theImagesSm[whichImageSm]+'" border=0 width=230 height=215></a>');
}
else if(whichImageSm==6){
document.write('<a href ="buscador.asp?dep=13"><img src="'+theImagesSm[whichImageSm]+'" border=0 width=230 height=215></a>');
}
}