// Caminho do site
//var caminhoSite = 'http://www.majestichotel.com.br';
var caminhoSite = '..';
// Set the slideshow speed (in milliseconds)
if(SlideShowSpeed == ''){ var SlideShowSpeed = 4000;}
// Set the duration of crossfade (in seconds)
if(CrossFadeDuration == ''){ var CrossFadeDuration = 3;}
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
	preLoad[iss] = new Image();
	preLoad[iss].src = Picture[iss];
}

function runSlideShow(){
	if (document.all){
		document.getElementById("PictureBox").style.filter="blendTrans(duration=3)";
		document.getElementById("PictureBox").style.filter="blendTrans(duration=CrossFadeDuration)";
		document.getElementById("PictureBox").filters.blendTrans.Apply();
	}
	document.getElementById("PictureBox").src = preLoad[jss].src;
	document.getElementById("PictureBox").alt = Caption[jss];
	document.getElementById("CaptionBox").innerHTML = Caption[jss];
	if (document.all) 
		document.getElementById("PictureBox").filters.blendTrans.Play(); //IECA
	jss = jss + 1;
	if (jss > (pss)) jss=1;
	tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

function mudaFoto(arq, total){
	var caminho = '';
	var url = '';
	var img = document.getElementById("imagem");
	caminho = caminhoSite+'/imagens/'+arq+'/1.jpg';
	img.style.backgroundImage = 'url("'+caminho+'")';
	if(total>1){
		for(i=2;i<=total;i++){
			caminho = caminhoSite+'/imagens/'+arq+'/'+i+'.jpg';
			url = "url('"+caminho+"')";
			img.style.backgroundImage = fade(url);
		}
	}
}