//CONFIGURACION DEL FADE
ie5  = (document.all && document.getElementById);
ns6 = (!document.all && document.getElementById);
contador=0

function cambiar(num,indice,titulo,total)
  {
	document.getElementById('slideshow').style.visibility = "visible"; 
	document.getElementById('galeria').style.visibility = "hidden";  
	 document.getElementById('slideshow').src = "";
	document.getElementById('slideshow').src = "cargando.jpg";
    document.getElementById('slideshow').src = "imgs_obra/obra "+num+".jpg";
	if(ns6)
	   {contador=0;
		fade_nt();}
    else
	   {contador=0
	    fade_ie();}
	document.getElementById('titulo').innerHTML = titulo;
	document.getElementById('contador').innerHTML = "<b> "+indice+" / "+total+"</b>";
  }

function cambiar_tarabust(num)
  {
	document.getElementById('slideshow').style.visibility = "visible"; 
	document.getElementById('slideshow').style.display= "block"; 
	document.getElementById('galeria').style.visibility = "hidden";  
	 document.getElementById('slideshow').src = "";
	document.getElementById('slideshow').src = "cargando.jpg";
    document.getElementById('slideshow').src = "imgs_obra/tarabust_"+num+".jpg";
	//tomamos el objeto que es un <div> que tiene como id la palabra "contador" dspuésn de
    // cambiar la imagen, imprimimos con inner.HTML el contador.
	document.getElementById('contador').innerHTML = "<b> "+num+" / 8</b>";
	if(ns6)
	   {contador=0;
		fade_nt();}
    else
	   {contador=0
	    fade_ie();}
  }


function fade_nt()
  {
  if(contador<=100)
     {
	   document.getElementById('slideshow').style.MozOpacity = contador/100;
	   contador+=1;
	   setTimeout('fade_nt()',1);
	  }	  
  }
 
function fade_ie()
  {
  if(contador<=100)
     {
	   document.getElementById('slideshow').filters.alpha.opacity  = contador;
	   contador+=1;
	   setTimeout('fade_ie()',1);
	  }	  
  }
  