var slideShowSpeed = 3000 
var crossFadeDuration = 3
var Pic = new Array()

	Pic[0]='../img/fotos/0030.jpg'
	Pic[1]='../img/fotos/0001.jpg'
	Pic[2]='../img/fotos/0002.jpg'
	Pic[3]='../img/fotos/0003.jpg'
	Pic[4]='../img/fotos/0004.jpg'
	Pic[5]='../img/fotos/0005.jpg'
	Pic[6]='../img/fotos/0006.jpg'
	Pic[7]='../img/fotos/0007.jpg'
	Pic[8]='../img/fotos/0008.jpg'
	Pic[9]='../img/fotos/0009.jpg'
	Pic[10]='../img/fotos/0010.jpg'
	Pic[11]='../img/fotos/0011.jpg'
	Pic[12]='../img/fotos/0012.jpg'
	Pic[13]='../img/fotos/0013.jpg'
	Pic[14]='../img/fotos/0014.jpg'
	Pic[15]='../img/fotos/0015.jpg'
	Pic[16]='../img/fotos/0016.jpg'
	Pic[17]='../img/fotos/0017.jpg'
	Pic[18]='../img/fotos/0018.jpg'
	Pic[19]='../img/fotos/0019.jpg'
	Pic[20]='../img/fotos/0020.jpg'
	Pic[21]='../img/fotos/0021.jpg'
	Pic[22]='../img/fotos/0022.jpg'
	Pic[23]='../img/fotos/0023.jpg'
	Pic[24]='../img/fotos/0024.jpg'
	Pic[25]='../img/fotos/0025.jpg'
	Pic[26]='../img/fotos/0026.jpg'
	Pic[27]='../img/fotos/0027.jpg'
	Pic[28]='../img/fotos/0028.jpg'
	Pic[29]='../img/fotos/0029.jpg'
	Pic[30]='../img/fotos/0030.jpg'

//for (i=0;i<5;i++){
	//Pic[i+10]='../img/fotos/apa'+(i+1)+'.jpg'
//}
		
var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function carrusel(){
   if (document.all){
	  document.images.SlideShow.style.filter="blendTrans(duration=3)"
	  document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
	  document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
	  document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('carrusel()', slideShowSpeed);
}
	
function actualizaFoto(imagen){
	var arrayRuta=imagen.src.split("/");
	arrayRuta.splice(arrayRuta.length-2,1);
	var rutaReconstruida=arrayRuta.join("/");
	document.images.SlideShow.src=rutaReconstruida;
	t = clearTimeout(t);
}

