// ABRINDO JANELA
function AbrePagina(pagina, tamx, tamy, rolagem) {
	lf = Math.floor(screen.width/2) - Math.floor(tamx/2);
	tp = Math.floor(screen.height/2) - Math.floor(tamy/2);
	window.open(pagina,"janela","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=" + rolagem + ",width=" + tamx + ",height=" + tamy + ", left = " + lf + ", top = " + tp)
}

// TROCANDO IMAGENS NA SECAO COMO CHEGAR
if (document.images) {
	mun = new Image();
	mun.src = "img/mapa_mundi_pt.gif";
	america = new Image();
	america.src = "img/america_do_sul_pt.gif";
	es = new Image();
	es.src = "img/es.gif";
	gv = new Image();
	gv.src = "img/mapa_vitoria.jpg";
	foto = new Image();
	foto.src = "img/aerea.jpg";
}
i = 1;
function troca() {
	if (i == 1) {
		document.images.mapa.src = mun.src;
		i = 2;
	} else if (i == 2) {
		document.images.mapa.src = america.src;
		i = 3;
	} else if (i == 3) {
		document.images.mapa.src = es.src;
		i = 4;
	} else if (i == 4) {
		document.images.mapa.src = gv.src;
		i = 5;
	} 
}

function showFoto(id) {
	if(document.getElementById('fotos'+id)) {
		if(document.getElementById('fotos'+id).style.display == 'none') {
			document.getElementById('fotos'+id).style.display = 'block';
		} else {
			document.getElementById('fotos'+id).style.display = 'none';
		}
	}
}


function showMapa(id) {
	if(document.getElementById('mapa'+id)) {
		if(document.getElementById('mapa'+id).style.display == 'none') {
			document.getElementById('mapa'+id).style.display = 'block';
		} else {
			document.getElementById('mapa'+id).style.display = 'none';
		}
	}
}

function showReserva(id) {
	if(document.getElementById('reserva'+id)) {
		if(document.getElementById('reserva'+id).style.display == 'none') {
			document.getElementById('reserva'+id).style.display = 'block';
		} else {
			document.getElementById('reserva'+id).style.display = 'none';
		}
	}
}
