


function preLoadPic(index)
{
	if (Pic[index] != '')
	{
		window.status='Loading : '+Pic[index]
		preLoad[index] = new Image()
		preLoad[index].src = Pic[index]
		window.status=''
	}

}

function runSlideShow()
{
	if (xIE4Up)
	{
		document.images.SlideShow.style.filter="blendTrans(duration=2)"
		document.images.SlideShow.style.filter= "blendTrans(duration=crossFadeDuration)"
		document.images.SlideShow.filters.blendTrans.Apply()
    }
//	document.images.SlideShow.src = preLoad[j].src;
	document.images.SlideShow.src = (preLoad[j]).src;
	document.images.SlideShow.height=TamAlto[j];
	document.images.SlideShow.width=TamAncho[j]; 
	CambiarTexto("titulo",Titulo[j]);
	
	
	if (xIE4Up)
	{
		document.images.SlideShow.filters.blendTrans.Play()
	}

	j = j + 1
	if (j > (p-1)) j=0
	t = setTimeout('runSlideShow()', slideShowSpeed)
	preLoadPic(j)
}


// Cambia el texto en caso que hubiera de un <p>
// id es el identificador de <p>
// texto es el texto nuevo que se quiere poner.
function CambiarTexto(id,texto)
{
	var el = document.getElementById(id);	
	var text = document.createTextNode(texto);
	if(el.hasChildNodes())
	{	el.removeChild(el.lastChild);
	}
	el.appendChild(text);
}