function stopSlide()
{
clearTimeout(t);
}

var slideSpeed = 3000
var crossFadeDur = 3


function callfotos(dir,fn){

if (dir == 'inicio'){
dirtest=dir;
fntest=fn;
}
else{
if (fn == 'none'){
nphotos=fotos[eval(dir)].split("_");
} 
else{
listf=eval('fotos'+dir);
nphotos=listf[eval(fn)].split("_");
}	
fntest=eval(nphotos[0]);
dirtest=nphotos[1];
}

return runSlideShow(dirtest,fntest,'comeco');

}



function runSlideShow(dir,fn,tipo){

if (tipo == 'comeco'){
y=0;
}


var Pick = new Array();

for (z=0;z<=fn-1;z++) {
Pick[z] = "foto"+(z+1)+".jpg";
}

var preLoaded = new Array()

for (i = 0; i < fn; i++){

   preLoaded[i] = new Image()

   preLoaded[i].src = "fotos/"+dir+"/"+Pick[i]
}



 if (document.all){

      document.images.SlideShow.style.filter="blendTrans(duration=2)"

      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDur)"

      document.images.SlideShow.filters.blendTrans.Apply()      

   }

   document.images.SlideShow.src = preLoaded[y].src

   if (document.all){

      document.images.SlideShow.filters.blendTrans.Play()

   }

   y = y + 1

   if (y > (fn-1)) y=0

   t=setTimeout('runSlideShow("'+dir+'",'+fn+',"slide")', slideSpeed)
   
   }