var swf_arquivo, swf_lar, swf_alt;$(function () {swf_arquivo = $("#mapa_swf div div.arquivo").text();swf_lar = $("#mapa_swf div div.largura").text();swf_alt = $("#mapa_swf div div.altura").text();$("#mapa_swf").html("<img style=\"margin:200px 0 0 50%;\" src=\"/img/carregando.gif\"/>");setTimeout(CarregarMapa, 500);$("#logo_emp").each(function() {//Carregando o logo do empreendimento
$(this).error(function() {//Caso a imagem não carregue
$(this).hide();//Oculta a imagem
}).attr("src", this.src);//Atualizar
});setInterval(function(){ //Redimensionamento do quadro do mapa
$("div.mapa").css("height", document.documentElement.clientHeight - $("#topo")[0].offsetHeight - ($("#tabela"). length == 0 ? 0 : $("#tabela")[0].offsetHeight) - $("#base")[0].offsetHeight);try {var iframedoc = $("#tabela iframe")[0].contentDocument;if (typeof(iframedoc) === "undefined") iframedoc = $("#tabela iframe")[0].contentWindow.document;$("#tabela iframe").css("height", $(iframedoc).find(".quadrocss")[0].offsetHeight);} catch(ex) { }
}, 500);$("#botoes .zoomzero").click(function(){ZoomMapa(0);});$("#botoes .zoomin").click(function(){ZoomMapa(1.25);});$("#botoes .zoomout").click(function(){ZoomMapa(0.75);});$("#botoes .print").click(function(){print();}).dblclick(function(e){alert("Para imprimir o mapa completo\nextendido numa única página,\nutilize a impressão do Adobe Flash:\n\n- clique com o botão direito no mapa;\n- selecione \"Print...\".");return false;});});function CarregarMapa() {swfobject.embedSWF(//Carregando o swf do mapa
"/mapas/swf/" + swf_arquivo,
"mapa_swf",
swf_lar,
swf_alt,
"7",
"/swf/expressInstall.swf",
{xml: swf_arquivo.split("_")[0]},
{wmode: "Transparent", quality: "best", scale: "default", movie: "/mapas/swf/" + swf_arquivo}
);}
function ZoomMapa(idx) {var swf = $("#mapa_swf")[0];var width, height;if ((idx == 0) || (swf.style.width === "")) {width = swf.width;height = swf.height;} else {width = swf.style.width.replace("px","");height = swf.style.height.replace("px","");}
if (idx != 0) {width *= idx;height *= idx;}
width += "px";height += "px";$(swf).animate({width: width, height: height}, 1000);}
