//VARIABLES GLOBALES DE CONFIGURACIÓN ---------------------------------------

//Lo q tarda en incrementar la opacidad de la foto, directamente proporcional
//a la velocidad de aparicion
var cadenciaAparicion = 4

// Incrementa la opacidad de la imagen hasta el 100%
function high(cur2)
{
  //alert(cur2.src)
  cur2.filters.alpha.opacity+=cadenciaAparicion
  if (cur2.filters.alpha.opacity<100)
     {
       cur3 = cur2
       setTimeout("high(cur3)",50)
     }
}

function cambiarImagen(img1,img2)
{
var ruta = img2.src;
var vector = ruta.split("/");
img1.filters.alpha.opacity=10
img1.src = "fotos/" + vector[vector.length-1];
//alert(img1.src);
high(img1);
}

function cambiarImagen2(img)
{
    var img2 = document.getElementById("imgGrande");
    //alert(img.width);
    //alert(img.height);
    img2.src = img.src;
    img2.width = img.width;
    img2.height = img.height;
    //alert(img2.width);
    //alert(img2.height);
    img2.filters.alpha.opacity=10;
    high(img2);
}

function plegarDesplegar(id)
{
    if( document.getElementById(id).style.display == "none")
    {
        document.getElementById(id).style.display = "block";
    }   
    else
    {
        document.getElementById(id).style.display = "none";
        document.getElementById("fotos").style.height = '20px';
    }
}
    
function precargarVectorImagenes(vector)
{
 var Imagenes = new Array()
 for(var i=0;i<vector.length;i++){
   Imagenes[i] = new Image()
   Imagenes[i].src = vector[i]
  }
 return Imagenes
}

