Commit d6e4bb783a5a6d92cd63c29fbf486d62615974e4

Authored by Edmar Moretti
1 parent b379a8d7

Alteração na ferramenta de cálculo de distâncias para utilizar a API do OpenLayers nessa interface

classesjs/classe_analise.js
... ... @@ -38,6 +38,7 @@ if(typeof(i3GEO) === 'undefined'){
38 38 }
39 39 i3GEO.analise = {
40 40 //armazena os pontos coletados nas funcoes de medicao de area e distancia
  41 + //@TODO remover apos concluir a refatoracao do codigo
41 42 pontosdistobj: {},
42 43 /*
43 44 Classe: i3GEO.analise.dialogo
... ... @@ -223,28 +224,26 @@ i3GEO.analise = {
223 224 i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos");
224 225 }
225 226 },
226   - /*
227   - Classe: i3GEO.analise.medeDistancia
228   -
229   - Ativa e controla a opcao de medicao de distancias.
230   -
231   - A medida e feita quando o usuario clica no mapa com esta opcao ativa
232   -
233   - Quando o botao e acionado, abre-se a janela que mostra o resultado da medida, o icone que segue o mouse e alterado.
234   -
235   - Para mostrar o resultado do calculo, e incluido um div especifico.
  227 + /**
  228 + * i3GEO.analise.medeDistancia
  229 + * Ativa e controla a opcao de medicao de distancias.
  230 + * A medida e feita quando o usuario clica no mapa com esta opcao ativa
  231 + * Quando o botao e acionado, abre-se a janela que mostra o resultado da medida, o icone que segue o mouse e alterado.
  232 + * Para mostrar o resultado do calculo, e incluido um div especifico.
236 233 */
237 234 medeDistancia:{
238   - /*
239   - Function: inicia
240   -
241   - Inicia a operacao de medicao, abrindo a janela de resultados e criando os componentes necessorios
242   -
243   - Sao registrados os eventos de clique sobre o mapa e fechamento da janela de resultados
  235 + /**
  236 + * Armazena os pontos clicados para realizar os calculos
  237 + */
  238 + pontos: {},
  239 + /**
  240 + * Inicia a operacao de medicao, abrindo a janela de resultados e criando os componentes necessorios
  241 + * Sao registrados os eventos de clique sobre o mapa e fechamento da janela de resultados
244 242 */
245 243 inicia: function(){
246 244 if(typeof(console) !== 'undefined'){console.info("i3GEO.analise.medeDistancia.inicia()");}
247 245 i3GEO.eventos.cliquePerm.desativa();
  246 + //@TODO remover apos concluir a refatoracao do codigo
248 247 i3GEO.analise.pontosdistobj = {
249 248 xpt: [],
250 249 ypt: [],
... ... @@ -271,6 +270,7 @@ i3GEO.analise = {
271 270 ins = '<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>' +
272 271 '<div class="bd" style="text-align:left;padding:3px;" >' +
273 272 '<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>' +
  273 + '<div style="text-align:left;padding:3px;" id="mostradistancia_calculo_movel" ></div>' +
274 274 '<div style="text-align:left;font-size:10px" >' +
275 275 '<span style="color:navy;cursor:pointer;text-align:left;" >' +
276 276 '<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>' +
... ... @@ -309,52 +309,241 @@ i3GEO.analise = {
309 309 }}}
310 310 );
311 311 },
312   - /*
313   - Function: fechaJanela
314   -
315   - Fecha a janela e os elementos graficos criados para a ferramenta de medicao
  312 + /**
  313 + *Fecha a janela e os elementos graficos criados para a ferramenta de medicao
  314 + *Chama a funcao de cada interface que complementam o processo de fechamento da janela
316 315 */
317 316 fechaJanela: function(){
318 317 var janela;
319 318 i3GEO.eventos.cliquePerm.ativa();
320   - i3GEO.Interface.ATUAL !== "googleearth" ? i3GEO.desenho.richdraw.fecha() : i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");
321   - i3GEO.util.removeChild("pontosins");
322   - if($i("divGeometriasTemp"))
323   - {i3GEO.desenho.richdraw.fecha();}
324   - i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");
325   - i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");
326   - i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");
327   - i3GEO.barraDeBotoes.ativaBotoes();
  319 + //@TODO remover
  320 + if(i3GEO.Interface.ATUAL !== "openlayers"){
  321 + i3GEO.Interface.ATUAL !== "googleearth" ? i3GEO.desenho.richdraw.fecha() : i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");
  322 + i3GEO.util.removeChild("pontosins");
  323 + if($i("divGeometriasTemp"))
  324 + {i3GEO.desenho.richdraw.fecha();}
  325 + i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");
  326 + i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");
  327 + i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");
  328 + i3GEO.barraDeBotoes.ativaBotoes();
  329 + }
328 330 janela = YAHOO.i3GEO.janela.manager.find("mostradistancia");
329 331 if(janela){
330 332 YAHOO.i3GEO.janela.manager.remove(janela);
331 333 janela.destroy();
332 334 }
333 335 i3GEO.barraDeBotoes.ativaIcone("pointer");
  336 + i3GEO.analise.medeDistancia[i3GEO.Interface["ATUAL"]].fechaJanela();
334 337 },
  338 + /**
  339 + * Funcoes especificas da interface openlayers
  340 + */
335 341 openlayers:{
  342 + /**
  343 + * Inicializa o processo
  344 + * Cria a variavel para guardar os pontos
  345 + * Executa a funcao de inicializacao do desenho, que cria o layer para receber os graficos
  346 + */
336 347 inicia: function(){
337   - if (g_tipoacao !== "mede"){
338   - if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()") < 0)
339   - {i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()");}
340   - if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()") < 0)
341   - {i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()");}
342   - if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()") < 0)
343   - {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()");}
344   - $i("mostradistancia").style.display="block";
345   - if(i3GEO.Interface.ATUAL !== "googleearth"){
346   - i3GEO.desenho.criaContainerRichdraw();
347   - i3GEO.desenho.richdraw.lineColor = "black";
348   - i3GEO.desenho.richdraw.lineWidth = "2px";
  348 + var linha,
  349 + estilo = i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao],
  350 + controle = i3geoOL.getControlsBy("id","i3GeoMedeDistancia");
  351 + i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia();
  352 + i3GEO.analise.medeDistancia.pontos = {
  353 + xpt: [],
  354 + ypt: [],
  355 + dist: []
  356 + };
  357 + if(controle.length === 0){
  358 + linha = new OpenLayers.Control.DrawFeature(
  359 + i3GEO.desenho.layergrafico,
  360 + OpenLayers.Handler.Path,
  361 + {
  362 + autoActivate: true,
  363 + id: "i3GeoMedeDistancia",
  364 + type: OpenLayers.Control.TYPE_TOOL,
  365 + callbacks:{
  366 + done: function(feature){
  367 + var f = new OpenLayers.Feature.Vector(
  368 + feature,
  369 + {
  370 + strokeWidth: estilo.linewidth,
  371 + strokeColor: estilo.linecolor,
  372 + origem: "medeDistancia"
  373 + },
  374 + {
  375 + graphicName: "square",
  376 + pointRadius: 10,
  377 + graphicOpacity: 1
  378 + }
  379 + );
  380 + i3GEO.desenho.layergrafico.addFeatures([f]);
  381 + if(i3GEO.Interface){
  382 + i3GEO.Interface.openlayers.sobeLayersGraficos();
  383 + }
  384 + i3GEO.analise.medeDistancia.openlayers.mostraParcial(0,0,0);
  385 + i3GEO.analise.medeDistancia.openlayers.inicia();
  386 + },
  387 + modify: function(point){
  388 + var n,x1,y1,x2,y2,trecho,parcial,direcao;
  389 + n = i3GEO.analise.medeDistancia.pontos.ypt.length;
  390 + if(n > 0){
  391 + x1 = i3GEO.analise.medeDistancia.pontos.xpt[n-1];
  392 + y1 = i3GEO.analise.medeDistancia.pontos.ypt[n-1];
  393 + x2 = point.x;
  394 + y2 = point.y;
  395 + //projeta
  396 + if(i3GEO.Interface.openlayers.googleLike){
  397 + temp = i3GEO.util.extOSM2Geo(x1+" "+y1+" "+x2+" "+y2);
  398 + temp = temp.split(" ");
  399 + x1 = temp[0];
  400 + y1 = temp[1];
  401 + x2 = temp[2];
  402 + y2 = temp[3];
  403 + }
  404 + trecho = i3GEO.calculo.distancia(x1,y1,x2,y2);
  405 + parcial = i3GEO.analise.medeDistancia.openlayers.somaDist();
  406 + direcao = i3GEO.calculo.direcao(x1,y1,x2,y2);
  407 + i3GEO.analise.medeDistancia.openlayers.mostraParcial(trecho,parcial,direcao);
  408 + }
  409 + },
  410 + point: function(point){
  411 + var n,x1,y1,x2,y2,trecho,temp,circ,label,raio,
  412 + //registra os pontos e calcula a distancia
  413 + total = 0;
  414 + i3GEO.analise.medeDistancia.pontos.xpt.push(point.x);
  415 + i3GEO.analise.medeDistancia.pontos.ypt.push(point.y);
  416 + n = i3GEO.analise.medeDistancia.pontos.ypt.length;
  417 + if(n > 1){
  418 + x1 = i3GEO.analise.medeDistancia.pontos.xpt[n-2];
  419 + y1 = i3GEO.analise.medeDistancia.pontos.ypt[n-2];
  420 + x2 = point.x;
  421 + y2 = point.y;
  422 + raio = point.distanceTo(new OpenLayers.Geometry.Point(x1,y1));
  423 + //projeta
  424 + if(i3GEO.Interface.openlayers.googleLike){
  425 + temp = i3GEO.util.extOSM2Geo(x1+" "+y1+" "+x2+" "+y2);
  426 + temp = temp.split(" ");
  427 + x1 = temp[0];
  428 + y1 = temp[1];
  429 + x2 = temp[2];
  430 + y2 = temp[3];
  431 + }
  432 + trecho = i3GEO.calculo.distancia(x1,y1,x2,y2);
  433 + i3GEO.analise.medeDistancia.pontos.dist.push(trecho);
  434 + total = i3GEO.analise.medeDistancia.openlayers.somaDist();
  435 + i3GEO.analise.medeDistancia.openlayers.mostraTotal(trecho,total);
  436 + //raio
  437 + if($i("pararraios") && $i("pararraios").checked === true ){
  438 + circ = new OpenLayers.Feature.Vector(
  439 + OpenLayers.Geometry.Polygon.createRegularPolygon(
  440 + point,
  441 + raio,
  442 + 30
  443 + ),
  444 + {
  445 + strokeWidth: 1,
  446 + origem: "medeDistanciaExcluir"
  447 + },
  448 + {
  449 + fill: false,
  450 + strokeColor: "#FFFFFF"
  451 + }
  452 + );
  453 + i3GEO.desenho.layergrafico.addFeatures([circ]);
  454 + }
  455 + //desenha ponto
  456 + if($i("parartextos") && $i("parartextos").checked === true ){
  457 + label = new OpenLayers.Feature.Vector(
  458 + new OpenLayers.Geometry.Point(point.x,point.y),
  459 + {
  460 + origem: "medeDistanciaExcluir"
  461 + },
  462 + {
  463 + graphicName: "square",
  464 + pointRadius: 3,
  465 + strokeColor: "black",
  466 + graphicOpacity: 1,
  467 + strokeWidth: 1,
  468 + fillColor: "white",
  469 + label: trecho.toFixed(3),
  470 + labelAlign: "rb",
  471 + fontColor: "gray",
  472 + fontSize: 12,
  473 + fontWeight: "bold"
  474 + }
  475 + );
  476 + i3GEO.desenho.layergrafico.addFeatures([label]);
  477 + }
  478 + }
  479 + }
  480 + }
  481 + }
  482 + );
  483 + i3geoOL.addControl(linha);
  484 + }
  485 + },
  486 + /**
  487 + * Soma os valores de distancia guardados em pontos.dist
  488 + */
  489 + somaDist: function(){
  490 + var n,i,
  491 + total = 0;
  492 + n = i3GEO.analise.medeDistancia.pontos.dist.length;
  493 + for(i=0;i<n;i++){
  494 + total += i3GEO.analise.medeDistancia.pontos.dist[i];
  495 + }
  496 + return total;
  497 + },
  498 + /**
  499 + * Fecha a janela que mostra os dados
  500 + * Pergunta ao usuario se os graficos devem ser removidos
  501 + * Os graficos sao marcados com o atributo "origem"
  502 + * Os raios e pontos sao sempre removidos
  503 + */
  504 + fechaJanela: function(){
  505 + var temp,
  506 + controle = i3geoOL.getControlsBy("id","i3GeoMedeDistancia"),
  507 + f = i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistancia");
  508 + if(controle.length > 0){
  509 + controle[0].deactivate();
  510 + i3geoOL.removeControl(controle[0]);
  511 + }
  512 + if(f && f.length > 0){
  513 + temp = window.confirm($trad("x94"));
  514 + if(temp){
  515 + i3GEO.desenho.layergrafico.destroyFeatures(f);
349 516 }
350   - g_tipoacao = "mede";
351 517 }
352   - else{
353   - if(i3GEO.Interface.ATUAL !== "googleearth")
354   - {i3GEO.desenho.richdraw.fecha();}
355   - var Dom = YAHOO.util.Dom;
356   - Dom.setStyle("mostradistancia","display","none");
357   - Dom.setStyle("pontosins","display","none");
  518 + f = i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistanciaExcluir");
  519 + if(f && f.length > 0){
  520 + i3GEO.desenho.layergrafico.destroyFeatures(f);
  521 + }
  522 + },
  523 + /**
  524 + * Mostra a totalizacao das linhas ja digitalizadas
  525 + */
  526 + mostraTotal: function(trecho,total){
  527 + var mostra = $i("mostradistancia_calculo"),
  528 + texto;
  529 + if (mostra){
  530 + texto = "<b>atual:</b> "+total.toFixed(3)+" km"+
  531 + "<br><b>atual:</b> "+(total*1000).toFixed(2)+" m"+
  532 + "<br>"+$trad("x25")+": "+i3GEO.calculo.metododistancia;
  533 + mostra.innerHTML = texto;
  534 + }
  535 + },
  536 + /**
  537 + * Mostra o valor do trecho entre o ultimo ponto clicado e a posicao do mouse
  538 + */
  539 + mostraParcial: function(trecho,parcial,direcao){
  540 + var mostra = $i("mostradistancia_calculo_movel"),
  541 + texto;
  542 + if (mostra){
  543 + texto = "<b>trecho:</b> "+trecho.toFixed(3)+" km"+
  544 + "<br><b>total:</b> "+(parcial + trecho).toFixed(3)+" km" +
  545 + "<br><b>"+$trad("x23")+" (DMS):</b> "+direcao.toFixed(4);
  546 + mostra.innerHTML = texto;
358 547 }
359 548 }
360 549 },
... ... @@ -379,6 +568,9 @@ i3GEO.analise = {
379 568 Dom.setStyle("mostradistancia","display","none");
380 569 Dom.setStyle("pontosins","display","none");
381 570 }
  571 + },
  572 + fechaJanela: function(){
  573 +
382 574 }
383 575 },
384 576 googleearth:{
... ... @@ -398,6 +590,9 @@ i3GEO.analise = {
398 590 Dom.setStyle("mostradistancia","display","none");
399 591 Dom.setStyle("pontosins","display","none");
400 592 }
  593 + },
  594 + fechaJanela: function(){
  595 +
401 596 }
402 597 },
403 598  
... ... @@ -710,4 +905,3 @@ i3GEO.analise = {
710 905 }
711 906 }
712 907 };
713   -//YAHOO.log("carregou classe analise", "Classes i3geo");
714 908 \ No newline at end of file
... ...
classesjs/classe_barradebotoes.js
... ... @@ -1663,8 +1663,9 @@ i3GEO.barraDeBotoes = {
1663 1663 );
1664 1664 i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico]);
1665 1665 */
1666   - i3GEO.desenho.openlayers.criaLayerGrafico();
1667   -
  1666 + if(!i3GEO.desenho.layergrafico){
  1667 + i3GEO.desenho.openlayers.criaLayerGrafico();
  1668 + }
1668 1669 if(idjanela){
1669 1670 i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);
1670 1671 }
... ...
classesjs/classe_desenho.js
... ... @@ -54,6 +54,7 @@ i3GEO.desenho = {
54 54 {richdraw object}
55 55 */
56 56 richdraw: "",
  57 + layergrafico: null,
57 58 /*
58 59 Propriedade: estilos
59 60  
... ... @@ -61,6 +62,37 @@ i3GEO.desenho = {
61 62 */
62 63 estilos: {
63 64 "normal":{
  65 + fillcolor: '255,0,0',
  66 + linecolor: '0,0,0',
  67 + linewidth: '2',
  68 + circcolor: '255,255,255',
  69 + textcolor: '100,100,100'
  70 + },
  71 + "palido":{
  72 + fillcolor: '100,100,100',
  73 + linecolor: '100,100,100',
  74 + linewidth: '1',
  75 + circcolor: '100,100,100',
  76 + textcolor: '100,100,100'
  77 + },
  78 + "vermelho":{
  79 + fillcolor: '100,100,100',
  80 + linecolor: '255,0,0',
  81 + linewidth: '1',
  82 + circcolor: '255,50,0',
  83 + textcolor: '200,200,200'
  84 + },
  85 + "verde":{
  86 + fillcolor: '100,100,100',
  87 + linecolor: '100,255,100',
  88 + linewidth: '1',
  89 + circcolor: '0,255,0',
  90 + textcolor: '0,0,0'
  91 + }
  92 + },
  93 + //@TODO remover apos refatorar codigo
  94 + estilosOld: {
  95 + "normal":{
64 96 fillcolor: 'red',
65 97 linecolor: 'black',
66 98 linewidth: '1',
... ... @@ -103,82 +135,81 @@ i3GEO.desenho = {
103 135 * Cria o layer onde os desenhos serao inseridos
104 136 */
105 137 inicia: function(){
106   - if(!i3GEO.desenho.layergrafico || i3GEO.desenho.layergrafico != undefined){
  138 + if(!i3GEO.desenho.layergrafico){
107 139 i3GEO.desenho.openlayers.criaLayerGrafico();
108 140 }
109 141 },
110 142 //i3GEO.editorOL.layergrafico
111 143 criaLayerGrafico: function(){
112   - var sketchSymbolizers = {
113   - "Point": {
114   - fillColor: "rgb(${fillColor})",
115   - fillOpacity: "${opacidade}",
116   - strokeWidth: "${strokeWidth}",
117   - strokeOpacity: "${opacidade}",
118   - strokeColor: "rgb(${strokeColor})",
119   - label: "${texto}",
120   - pointRadius: "${pointRadius}",
121   - graphicName: "${graphicName}",
122   - fontSize: "${fontSize}",
123   - fontColor: "rgb(${fontColor})",
124   - fontFamily: "Arial",
125   - fontWeight: "normal",
126   - labelAlign: "lb",
127   - labelXOffset: "3",
128   - labelYOffset: "3",
129   - externalGraphic: "${externalGraphic}"
130   - },
131   - "Line": {
132   - strokeWidth: "${strokeWidth}",
133   - strokeOpacity: "${opacidade}",
134   - strokeColor: "rgb(${strokeColor})"
135   - },
136   - "Polygon": {
137   - strokeWidth: "${strokeWidth}",
138   - strokeOpacity: "${opacidade}",
139   - strokeColor: "rgb(${strokeColor})",
140   - fillColor: "rgb(${fillColor})",
141   - fillOpacity: "${opacidade}",
142   - zIndex: 5000
143   - }
144   - },
145   - style = new OpenLayers.Style(),
146   - styleMap1 = new OpenLayers.StyleMap(
147   - {
148   - "default": style,
149   - "vertex": {
150   - strokeOpacity: 1,
151   - strokeWidth: 1,
152   - fillColor: "white",
153   - fillOpacity: 0.45,
154   - pointRadius: 4
  144 + if(!i3GEO.desenho.layergrafico){
  145 + var sketchSymbolizers = {
  146 + "Point": {
  147 + fillColor: "rgb(${fillColor})",
  148 + fillOpacity: "${opacidade}",
  149 + strokeWidth: "${strokeWidth}",
  150 + strokeOpacity: "${opacidade}",
  151 + strokeColor: "rgb(${strokeColor})",
  152 + label: "${texto}",
  153 + pointRadius: "${pointRadius}",
  154 + graphicName: "${graphicName}",
  155 + fontSize: "${fontSize}",
  156 + fontColor: "rgb(${fontColor})",
  157 + fontFamily: "Arial",
  158 + fontWeight: "normal",
  159 + labelAlign: "lb",
  160 + labelXOffset: "3",
  161 + labelYOffset: "3",
  162 + externalGraphic: "${externalGraphic}"
  163 + },
  164 + "Line": {
  165 + strokeWidth: "${strokeWidth}",
  166 + strokeOpacity: "${opacidade}",
  167 + strokeColor: "rgb(${strokeColor})"
  168 + },
  169 + "Polygon": {
  170 + strokeWidth: "${strokeWidth}",
  171 + strokeOpacity: "${opacidade}",
  172 + strokeColor: "rgb(${strokeColor})",
  173 + fillColor: "rgb(${fillColor})",
  174 + fillOpacity: "${opacidade}",
  175 + zIndex: 5000
155 176 }
156   - },
157   - {
158   - extendDefault: false
159   - }
160   - ),
161   - renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
162   -
163   - style.addRules(
164   - [new OpenLayers.Rule({symbolizer: sketchSymbolizers})]
165   - );
166   - renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
167   - i3GEO.desenho.layergrafico = new OpenLayers.Layer.Vector(
168   - "Edi&ccedil;&atilde;o",{
169   - styleMap: styleMap1,
170   - displayInLayerSwitcher:true,
171   - visibility:true,
172   - renderers: renderer,
173   - vertexRenderIntent: "vertex"
174   - }
175   - );
176   - //para efeitos de compatibilidade
177   - if(i3GEO.editorOL.mapa){
178   - i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico]);
179   - }
180   - else{
181   - i3geoOL.addLayers([i3GEO.desenho.layergrafico]);
  177 + },
  178 + style = new OpenLayers.Style(),
  179 + styleMap1 = new OpenLayers.StyleMap(
  180 + {
  181 + "default": style,
  182 + "vertex": {
  183 + strokeOpacity: 1,
  184 + strokeWidth: 1,
  185 + fillColor: "white",
  186 + fillOpacity: 0.45,
  187 + pointRadius: 4
  188 + }
  189 + },
  190 + {
  191 + extendDefault: false
  192 + }
  193 + );
  194 + style.addRules(
  195 + [new OpenLayers.Rule({symbolizer: sketchSymbolizers})]
  196 + );
  197 + i3GEO.desenho.layergrafico = new OpenLayers.Layer.Vector(
  198 + "Graf",
  199 + {
  200 + styleMap: styleMap1,
  201 + displayInLayerSwitcher:true,
  202 + visibility:true,
  203 + vertexRenderIntent: "vertex"
  204 + }
  205 + );
  206 + //para efeitos de compatibilidade
  207 + if(i3GEO.editorOL && i3GEO.editorOL.mapa){
  208 + i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico]);
  209 + }
  210 + else{
  211 + i3geoOL.addLayers([i3GEO.desenho.layergrafico]);
  212 + }
182 213 }
183 214 }
184 215 },
... ... @@ -371,18 +402,24 @@ i3GEO.desenho = {
371 402 },
372 403 /*
373 404 Aplica um determinado padrao de estilos para os novos elementos que ser&atilde;o adicionados
  405 +
  406 + Para obter o estilo padrao, utilize i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao];
374 407  
375 408 Parametro:
376 409  
377 410 padrao {string} - nome do estilo
378 411 */
379 412 definePadrao: function(padrao){
380   - padrao = i3GEO.desenho.estilos[padrao];
381   - i3GEO.desenho.richdraw.editCommand('fillcolor', padrao.fillcolor);
382   - i3GEO.desenho.richdraw.editCommand('linecolor', padrao.linecolor);
383   - i3GEO.desenho.richdraw.editCommand('linewidth', padrao.linewidth);
384   - i3GEO.desenho.richdraw.editCommand('circcolor', padrao.circcolor);
385   - i3GEO.desenho.richdraw.editCommand('textcolor', padrao.textcolor);
  413 + i3GEO.desenho.estiloPadrao = padrao;
  414 + //@TODO remover apos refatorar o codigo
  415 + padrao = i3GEO.desenho.estilosOld[padrao];
  416 + if(i3GEO.desenho.richdraw){
  417 + i3GEO.desenho.richdraw.editCommand('fillcolor', padrao.fillcolor);
  418 + i3GEO.desenho.richdraw.editCommand('linecolor', padrao.linecolor);
  419 + i3GEO.desenho.richdraw.editCommand('linewidth', padrao.linewidth);
  420 + i3GEO.desenho.richdraw.editCommand('circcolor', padrao.circcolor);
  421 + i3GEO.desenho.richdraw.editCommand('textcolor', padrao.textcolor);
  422 + }
386 423 },
387 424 /*
388 425 Cria uma caixa de sele&ccedil;&atilde;o para escolha do estilo a ser utilizado
... ...
classesjs/classe_editorol.js
... ... @@ -162,7 +162,7 @@ i3GEO.editorOL = {
162 162 i3GEO.editorOL.incluilayergrafico = true;
163 163 }
164 164 if(i3GEO.editorOL.incluilayergrafico === true){
165   - if(!i3GEO.desenho.layergrafico || i3GEO.desenho.layergrafico != undefined){
  165 + if(!i3GEO.desenho.layergrafico){
166 166 i3GEO.editorOL.criaLayerGrafico();
167 167 }
168 168 }
... ... @@ -213,7 +213,7 @@ i3GEO.editorOL = {
213 213 i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i]);
214 214 }
215 215 }
216   - if(i3GEO.desenho.layergrafico !== ""){
  216 + if(!i3GEO.desenho.layergrafico){
217 217 i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico]);
218 218 }
219 219 i3GEO.editorOL.adicionaKml();
... ... @@ -791,16 +791,16 @@ i3GEO.editorOL = {
791 791 {
792 792 "default": style,
793 793 "vertex": {
794   - strokeOpacity: 1,
795   - strokeWidth: 1,
796   - fillColor: "white",
797   - fillOpacity: 0.45,
798   - pointRadius: 3
799   - }
  794 + strokeOpacity: 1,
  795 + strokeWidth: 1,
  796 + fillColor: "white",
  797 + fillOpacity: 0.45,
  798 + pointRadius: 3
  799 + }
800 800 },
801   - {
802   - extendDefault: false
803   - }
  801 + {
  802 + extendDefault: false
  803 + }
804 804 ),
805 805 adiciona = false,
806 806 button,
... ... @@ -1221,7 +1221,7 @@ i3GEO.editorOL = {
1221 1221 standalone: false,
1222 1222 createVertices: true,
1223 1223 styleMap: "default",
1224   - vertexRenderIntent: "vertex"
  1224 + vertexRenderIntent: "vertex"
1225 1225 }
1226 1226 );
1227 1227 controles.push(i3GEO.editorOL.ModifyFeature);
... ... @@ -1569,10 +1569,10 @@ i3GEO.editorOL = {
1569 1569 ' </tr>' +
1570 1570 '</table>' +
1571 1571 '<br />' +
1572   - '<p class=paragrafo ><b>Ajusta n em edi&ccedil;&atilde;o para o(a):</b></p>' +
  1572 + '<p class=paragrafo ><b>Ajusta n&oacute; em edi&ccedil;&atilde;o para o(a):</b></p>' +
1573 1573 '<table class=lista7 >' +
1574 1574 ' <tr>' +
1575   - ' <td></td><td>n</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>' +
  1575 + ' <td></td><td>n&oacute</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>' +
1576 1576 ' </tr>' +
1577 1577 ' <tr>' +
1578 1578 ' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_node" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_nodeTolerance" type="text" size="3" value=15 /></td>' +
... ...
classesjs/classe_interface.js
... ... @@ -90,7 +90,7 @@ i3GEO.Interface = {
90 90 /*
91 91 Propriedade: BARRABOTOESTOP
92 92  
93   - Distância da barra de bot&otilde;es em rela&ccedil;&atilde;o ao topo do mapa.
  93 + Dist�ncia da barra de bot&otilde;es em rela&ccedil;&atilde;o ao topo do mapa.
94 94  
95 95 Tipo:
96 96 {number}
... ... @@ -102,7 +102,7 @@ i3GEO.Interface = {
102 102 /*
103 103 Propriedade: BARRABOTOESLEFT
104 104  
105   - Distância da barra de bot&otilde;es em rela&ccedil;&atilde;o ao lado esquerdo do mapa.
  105 + Dist�ncia da barra de bot&otilde;es em rela&ccedil;&atilde;o ao lado esquerdo do mapa.
106 106  
107 107 Tipo:
108 108 {number}
... ... @@ -114,7 +114,7 @@ i3GEO.Interface = {
114 114 /*
115 115 Propriedade: BARRADEZOOMTOP
116 116  
117   - Distância da barra de zoom em rela&ccedil;&atilde;o ao topo do mapa.
  117 + Dist�ncia da barra de zoom em rela&ccedil;&atilde;o ao topo do mapa.
118 118  
119 119 Tipo:
120 120 {number}
... ... @@ -126,7 +126,7 @@ i3GEO.Interface = {
126 126 /*
127 127 Propriedade: BARRADEZOOMLEFT
128 128  
129   - Distância da barra de zoom em rela&ccedil;&atilde;o ao lado esquerdo do mapa.
  129 + Dist�ncia da barra de zoom em rela&ccedil;&atilde;o ao lado esquerdo do mapa.
130 130  
131 131 Tipo:
132 132 {number}
... ... @@ -323,7 +323,7 @@ i3GEO.Interface = {
323 323  
324 324 Parametros:
325 325  
326   - retorno {JSON} - objeto JSON com os parâmetros obtidos da fun&ccedil;&atilde;o PHP de redesenho do mapa. Quando igual a "", &eacute; feita apenas a atualiza&ccedil;&atilde;o da camada, sem que a &aacute;rvore de camadas seja atualizada.
  326 + retorno {JSON} - objeto JSON com os par�metros obtidos da fun&ccedil;&atilde;o PHP de redesenho do mapa. Quando igual a "", &eacute; feita apenas a atualiza&ccedil;&atilde;o da camada, sem que a &aacute;rvore de camadas seja atualizada.
327 327  
328 328 tema {string} - c&oacute;digo do tema
329 329 */
... ... @@ -409,7 +409,7 @@ i3GEO.Interface = {
409 409 /*
410 410 Function: alteraLayers
411 411  
412   - Altera todos os layers do mapa modificando um determinado parâmetro
  412 + Altera todos os layers do mapa modificando um determinado par�metro
413 413 */
414 414 alteraParametroLayers: function(parametro,valor){
415 415 if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.inicia()");}
... ... @@ -447,7 +447,7 @@ i3GEO.Interface = {
447 447 /*
448 448 Propriedade: parametrosMap
449 449  
450   - Permite incluir parametros da API do OpenLayers não previstos no i3Geo. Veja em http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Map-js.html
  450 + Permite incluir parametros da API do OpenLayers nao previstos no i3Geo. Veja em http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Map-js.html
451 451  
452 452 Exemplo i3GEO.Interface.openlayers.parametrosMap.scales = [50000000, 30000000, 10000000, 5000000];
453 453 */
... ... @@ -1242,7 +1242,7 @@ i3GEO.Interface = {
1242 1242 if(layers.length > 0){
1243 1243 layers[0].setVisibility(obj.checked);
1244 1244 if(obj.checked == true){
1245   - //foi necessário por causa de um bug no Firefox 27.0.1
  1245 + //foi necess�rio por causa de um bug no Firefox 27.0.1
1246 1246 /*
1247 1247 * @TODO verificar se persiste o erro nas versoes do FF
1248 1248 */
... ... @@ -1656,14 +1656,14 @@ i3GEO.Interface = {
1656 1656 */
1657 1657 ZOOMSCALE: [591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],
1658 1658 /*
1659   - Parâmetros adicionais que s&atilde;o inseridos na URL que define cada layer
  1659 + Par�metros adicionais que s&atilde;o inseridos na URL que define cada layer
1660 1660  
1661 1661 Tipo:
1662 1662 {string}
1663 1663 */
1664 1664 PARAMETROSLAYER: "&TIPOIMAGEM="+i3GEO.configura.tipoimagem,
1665 1665 /*
1666   - String acrescentada à url de cada tile para garantir a remo&ccedil;&atilde;o do cache local
  1666 + String acrescentada � url de cada tile para garantir a remo&ccedil;&atilde;o do cache local
1667 1667  
1668 1668 Type:
1669 1669 {string}
... ... @@ -2295,14 +2295,14 @@ i3GEO.Interface = {
2295 2295 /*
2296 2296 Variable: PARAMETROSLAYER
2297 2297  
2298   - Parâmetros adicionais que s&atilde;o inseridos na URL que define cada layer
  2298 + Par�metros adicionais que s&atilde;o inseridos na URL que define cada layer
2299 2299  
2300 2300 Tipo:
2301 2301 {string}
2302 2302 */
2303 2303 PARAMETROSLAYER: "&TIPOIMAGEM="+i3GEO.configura.tipoimagem,
2304 2304 /*
2305   - String acrescentada à url de cada tile para garantir a remo&ccedil;&atilde;o do cache local
  2305 + String acrescentada � url de cada tile para garantir a remo&ccedil;&atilde;o do cache local
2306 2306  
2307 2307 Type:
2308 2308 {string}
... ...
classesjs/compactados/classe_analise_compacto.js
1   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={dialogo:{saiku:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku")},graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},graficoInterativo1:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo1()","graficointerativo1","graficointerativo1")},linhaDoTempo:function(){i3GEO.janela.cria("450px","350px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc="",ifr="";try{ifr=$i("wdocai");if(navn){if(ifr){doc=ifr.contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}var ifr=$i("wdocai");ifr.style.width="100%"},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?i3GEO.janela.tempoMsg($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="2px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n+1,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x25")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?i3GEO.janela.tempoMsg("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}}try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={pontosdistobj:{},dialogo:{saiku:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku")},graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},graficoInterativo1:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo1()","graficointerativo1","graficointerativo1")},linhaDoTempo:function(){i3GEO.janela.cria("450px","350px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc="",ifr="";try{ifr=$i("wdocai");if(navn){if(ifr){doc=ifr.contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}var ifr=$i("wdocai");ifr.style.width="100%"},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?i3GEO.janela.tempoMsg($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{pontos:{},inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();i3GEO.analise.medeDistancia[i3GEO.Interface["ATUAL"]].inicia()},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo_movel" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(i3GEO.analise.pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();if(i3GEO.Interface.ATUAL!=="openlayers"){i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes()}janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer");i3GEO.analise.medeDistancia[i3GEO.Interface["ATUAL"]].fechaJanela()},openlayers:{inicia:function(){var linha,estilo=i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao],controle=i3geoOL.getControlsBy("id","i3GeoMedeDistancia");i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia();i3GEO.analise.medeDistancia.pontos={xpt:[],ypt:[],dist:[]};if(controle.length===0){linha=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},autoActivate:true,id:"i3GeoMedeDistancia",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature,{strokeWidth:estilo.linewidth,strokeColor:estilo.linecolor,origem:"medeDistancia"},{graphicName:"square",pointRadius:10,graphicOpacity:1});i3GEO.desenho.layergrafico.addFeatures([f]);if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}i3GEO.analise.medeDistancia.openlayers.mostraParcial(0,0,0);i3GEO.analise.medeDistancia.openlayers.inicia()},modify:function(point){var n,x1,y1,x2,y2,trecho,parcial,direcao;n=i3GEO.analise.medeDistancia.pontos.ypt.length;if(n>0){x1=i3GEO.analise.medeDistancia.pontos.xpt[n-1];y1=i3GEO.analise.medeDistancia.pontos.ypt[n-1];x2=point.x;y2=point.y;if(i3GEO.Interface.googleLike){temp=i3GEO.util.extOSM2Geo(x1,y1,x2,y2);temp=temp.split(" ");x1=temp[0];y1=temp[1];x2=temp[2];y2=temp[3]}trecho=i3GEO.calculo.distancia(x1,y1,x2,y2);parcial=i3GEO.analise.medeDistancia.openlayers.somaDist();direcao=i3GEO.calculo.direcao(x1,y1,x2,y2);i3GEO.analise.medeDistancia.openlayers.mostraParcial(trecho,parcial,direcao)}},point:function(point){var n,x1,y1,x2,y2,trecho,temp,circ,label,total=0;i3GEO.analise.medeDistancia.pontos.xpt.push(point.x);i3GEO.analise.medeDistancia.pontos.ypt.push(point.y);n=i3GEO.analise.medeDistancia.pontos.ypt.length;if(n>1){x1=i3GEO.analise.medeDistancia.pontos.xpt[n-2];y1=i3GEO.analise.medeDistancia.pontos.ypt[n-2];x2=point.x;y2=point.y;if(i3GEO.Interface.googleLike){temp=i3GEO.util.extOSM2Geo(x1,y1,x2,y2);temp=temp.split(" ");x1=temp[0];y1=temp[1];x2=temp[2];y2=temp[3]}trecho=i3GEO.calculo.distancia(x1,y1,x2,y2);i3GEO.analise.medeDistancia.pontos.dist.push(trecho);total=i3GEO.analise.medeDistancia.openlayers.somaDist();i3GEO.analise.medeDistancia.openlayers.mostraTotal(trecho,total);if($i("pararraios")&&$i("pararraios").checked===true){circ=new OpenLayers.Feature.Vector(OpenLayers.Geometry.Polygon.createRegularPolygon(point,point.distanceTo(new OpenLayers.Geometry.Point(x1,y1)),30),{strokeWidth:1,origem:"medeDistanciaExcluir"},{fill:false,strokeColor:"#FFFFFF"});i3GEO.desenho.layergrafico.addFeatures([circ])}if($i("parartextos")&&$i("parartextos").checked===true){label=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(point.x,point.y),{origem:"medeDistanciaExcluir"},{graphicName:"square",pointRadius:3,strokeColor:"black",graphicOpacity:1,strokeWidth:1,fillColor:"white",label:trecho.toFixed(3),labelAlign:"rb",fontColor:"gray",fontSize:12,fontWeight:"bold"});i3GEO.desenho.layergrafico.addFeatures([label])}}}}});i3geoOL.addControl(linha)}},somaDist:function(){var n,i,total=0;n=i3GEO.analise.medeDistancia.pontos.dist.length;for(i=0;i<n;i++){total+=i3GEO.analise.medeDistancia.pontos.dist[i]}return total},fechaJanela:function(){var temp,controle=i3geoOL.getControlsBy("id","i3GeoMedeDistancia"),f=i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistancia");if(controle.length>0){controle[0].deactivate();i3geoOL.removeControl(controle[0])}if(f&&f.length>0){temp=window.confirm($trad("x94"));if(temp){i3GEO.desenho.layergrafico.destroyFeatures(f)}}f=i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistanciaExcluir");if(f&&f.length>0){i3GEO.desenho.layergrafico.destroyFeatures(f)}},mostraTotal:function(trecho,total){var mostra=$i("mostradistancia_calculo"),texto;if(mostra){texto="<b>atual:</b> "+total.toFixed(3)+" km"+"<b>atual:</b> "+(total*1000).toFixed(2)+" m"+"<br>"+$trad("x25")+": "+i3GEO.calculo.metododistancia;mostra.innerHTML=texto}},mostraParcial:function(trecho,parcial,direcao){var mostra=$i("mostradistancia_calculo_movel"),texto;if(mostra){texto="<b>trecho:</b> "+trecho.toFixed(3)+" km"+"<br><b>total:</b> "+(parcial+trecho).toFixed(3)+" km"+"<br><b>"+$trad("x23")+" (DMS):</b> "+direcao;mostra.innerHTML=texto}}},googlemaps:{inicia:function(){if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="2px";g_tipoacao="mede"}else{i3GEO.desenho.richdraw.fecha();var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},fechaJanela:function(){}},googleearth:{inicia:function(){if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";g_tipoacao="mede"}else{var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},fechaJanela:function(){}},clique:function(){var n,d,decimal,dd,pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n+1,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,pontosdistobj=i3GEO.analise.pontosdistobj,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x25")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?i3GEO.janela.tempoMsg("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,m;pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}}try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}catch(men){}m=i3GEO.calculo.area(pontosdistobj.xtela,pontosdistobj.ytela,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/classe_barradebotoes_compacto.js
1   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:12,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,imprimir:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.textAlign="center";if(i3GEO.barraDeBotoes.POSICAO==="top"){temp.style.top="25px"}temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(){var temp=function(){var cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("janelaEditorLimites")};i3GEO.janela.cria("300px","100px","","","","Editor","janelaEditorLimites",false,"hd",cabecalho,minimiza);$i("janelaEditorLimites_corpo").style.backgroundColor="white";i3GEOF.editorlimites.inicia("janelaEditorLimites_corpo");i3GEOF.locregiao.iniciaJanelaFlutuante();YAHOO.i3GEO.janela.manager.find("i3GEOF.locregiao").moveTo(100,40)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/metaestat/editorlimites_dependencias.php",temp,"editorlimites_dependencias.php",true)}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};i3GEO.desenho.openlayers.criaLayerGrafico();if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir:true,google:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.textAlign="center";if(i3GEO.barraDeBotoes.POSICAO==="top"){temp.style.top="25px"}temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(){var temp=function(){var cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("janelaEditorLimites")};i3GEO.janela.cria("300px","100px","","","","Editor","janelaEditorLimites",false,"hd",cabecalho,minimiza);$i("janelaEditorLimites_corpo").style.backgroundColor="white";i3GEOF.editorlimites.inicia("janelaEditorLimites_corpo");i3GEOF.locregiao.iniciaJanelaFlutuante();YAHOO.i3GEO.janela.manager.find("i3GEOF.locregiao").moveTo(100,40)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/metaestat/editorlimites_dependencias.php",temp,"editorlimites_dependencias.php",true)}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/classe_calculo_compacto.js
1   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(x,y,pixel){var n=x.length,$polygon_area,$i;try{if(n>2){x.push(x[0]);y.push(y[0]);$polygon_area=0;for($i=0;$i<n;$i+=1){$polygon_area+=((x[$i]*y[$i+1])-(y[$i]*x[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/classe_desenho_compacto.js
1   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false}),renderer=OpenLayers.Util.getParameters(window.location.href).renderer;style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);renderer=(renderer)?[renderer]:OpenLayers.Layer.Vector.prototype.renderers;i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Edi&ccedil;&atilde;o",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,renderers:renderer,vertexRenderIntent:"vertex"});if(i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}},criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",layergrafico:null,estilos:{"normal":{fillcolor:'255,0,0',linecolor:'0,0,0',linewidth:'2',circcolor:'255,255,255',textcolor:'100,100,100'},"palido":{fillcolor:'100,100,100',linecolor:'100,100,100',linewidth:'1',circcolor:'100,100,100',textcolor:'100,100,100'},"vermelho":{fillcolor:'100,100,100',linecolor:'255,0,0',linewidth:'1',circcolor:'255,50,0',textcolor:'200,200,200'},"verde":{fillcolor:'100,100,100',linecolor:'100,255,100',linewidth:'1',circcolor:'0,255,0',textcolor:'0,0,0'}},estilosOld:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){if(!i3GEO.desenho.layergrafico){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Graf",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,vertexRenderIntent:"vertex"});if(i3GEO.editorOL&&i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}}},criaContainerRichdraw:function(){i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c,pontosdistobj=i3GEO.analise.pontosdistobj;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){i3GEO.desenho.estiloPadrao=padrao;padrao=i3GEO.desenho.estilosOld[padrao];if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)}},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/classe_editorol_compacto.js
1   -if(typeof(i3GEO)==='undefined'){var i3GEO={};navn=false;navm=false;$i=function(id){return document.getElementById(id)};app=navigator.appName.substring(0,1);if(app==='N'){navn=true}else{navm=true}OpenLayers.ImgPath="../pacotes/openlayers/img/";OpenLayers.Lang.setCode("pt-BR")}i3GEO.editorOL={simbologia:{opacidade:0.8,texto:"",fillColor:"250,180,15",strokeWidth:2,strokeColor:"250,150,0",pointRadius:4,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},backup:new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}),nomeFuncaoSalvar:"i3GEO.editorOL.salvaGeo()",e_oce:new OpenLayers.Layer.ArcGIS93Rest("ESRI Ocean Basemap","http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_ims:new OpenLayers.Layer.ArcGIS93Rest("ESRI Imagery World 2D","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_wsm:new OpenLayers.Layer.ArcGIS93Rest("ESRI World Street Map","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),ol_mma:new OpenLayers.Layer.WMS("Base cartogr&aacute;fica","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&",{layers:'baseraster',SRS:'EPSG:4618',FORMAT:'image/png'},{singleTile:false}),ol_wms:new OpenLayers.Layer.WMS("OpenLayers WMS","http://labs.metacarta.com/wms/vmap0",{layers:'basic'}),top_wms:new OpenLayers.Layer.WMS("Topon&iacute;mia MMA","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseref.map&",{layers:"base",FORMAT:'image/png'}),est_wms:new OpenLayers.Layer.WMS("Estados do Brasil","http://mapas.mma.gov.br/i3geo/ogc.php?tema=estadosl&",{layers:"estadosl",FORMAT:'image/png'}),fundo:"e_ims,e_wsm,ol_mma,ol_wms,top_wms,est_wms,e_oce",kml:[],layersIniciais:[],botoes:{'pan':true,'zoombox':true,'zoomtot':true,'zoomin':true,'zoomout':true,'legenda':true,'distancia':true,'area':true,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'listag':true,'corta':true,'apaga':true,'procura':true,'selecao':true,'salva':true,'ajuda':true,'propriedades':true,'fecha':false,'tools':true,'undo':false,'frente':false,'legenda':true,'rodadomouse':true},pontos:[],marca:"../pacotes/openlayers/img/marker-gold.png",controles:[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoomBar(),new OpenLayers.Control.LayerSwitcher({'ascending':false}),new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.MousePosition({'separator':' '}),new OpenLayers.Control.OverviewMap(),new OpenLayers.Control.KeyboardDefaults()],tiles:true,incluilayergrafico:true,ativalayerswitcher:false,ativarodadomouse:true,legendahtml:false,numzoom:12,maxext:"",mapext:new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081),mapa:"",inicia:function(){var single=false,alayers=[],fundo=(i3GEO.editorOL.fundo).split(","),nfundo=fundo.length,ncontroles=i3GEO.editorOL.controles.length,i,n;if(i3GEO.editorOL.tiles===false||i3GEO.editorOL.tiles==="false"){single=true}if(i3GEO.editorOL.ativalayerswitcher==="false"){i3GEO.editorOL.ativalayerswitcher=false}if(i3GEO.editorOL.ativalayerswitcher==="true"){i3GEO.editorOL.ativalayerswitcher=true}if(i3GEO.editorOL.ativarodadomouse==="false"){i3GEO.editorOL.ativarodadomouse=false}if(i3GEO.editorOL.ativarodadomouse==="true"){i3GEO.editorOL.ativarodadomouse=true}if(i3GEO.editorOL.legendahtml==="false"){i3GEO.editorOL.legendahtml=false}if(i3GEO.editorOL.legendahtml==="true"){i3GEO.editorOL.legendahtml=true}if(i3GEO.editorOL.incluilayergrafico==="false"){i3GEO.editorOL.incluilayergrafico=false}if(i3GEO.editorOL.incluilayergrafico==="true"){i3GEO.editorOL.incluilayergrafico=true}if(i3GEO.editorOL.incluilayergrafico===true){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.editorOL.criaLayerGrafico()}}else{i3GEO.desenho.layergrafico="";i3GEO.editorOL.botoes.linha=false;i3GEO.editorOL.botoes.ponto=false;i3GEO.editorOL.botoes.poligono=false;i3GEO.editorOL.botoes.texto=false;i3GEO.editorOL.botoes.edita=false;i3GEO.editorOL.botoes.listag=false;i3GEO.editorOL.botoes.corta=false;i3GEO.editorOL.botoes.apaga=false;i3GEO.editorOL.botoes.selecao=false;i3GEO.editorOL.botoes.salva=false;i3GEO.editorOL.botoes.propriedades=false;i3GEO.editorOL.botoes.fecha=false;i3GEO.editorOL.botoes.tools=false;i3GEO.editorOL.botoes.undo=false;i3GEO.editorOL.botoes.frente=false}if(i3GEO.editorOL.mapa===""){alert("O objeto i3GEO.editorOL.mapa precisa ser criado com new OpenLayers.Map()");return}for(i=0;i<ncontroles;i++){i3GEO.editorOL.mapa.addControl(i3GEO.editorOL.controles[i])}if(i3GEO.editorOL.fundo!=""){for(i=nfundo-1;i>=0;i--){if(fundo[i]!=""){try{eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';");eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);");eval("i3GEO.editorOL."+fundo[i]+".singleTile = false;");eval("alayers.push(i3GEO.editorOL."+fundo[i]+");")}catch(e){if(alayers[0]){alayers[0].setVisibility(true)}}}}}i3GEO.editorOL.mapa.addLayers(alayers);if(i3GEO.editorOL.layersIniciais!==""){n=i3GEO.editorOL.layersIniciais.length;for(i=0;i<n;i++){i3GEO.editorOL.layersIniciais[i].singleTile=single;i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i])}}if(i3GEO.desenho.layergrafico!==""){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}i3GEO.editorOL.adicionaKml();i3GEO.editorOL.adicionaMarcas();i3GEO.editorOL.coordenadas();i3GEO.editorOL.criaJanelaBusca();i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);if(i3GEO.editorOL.ativalayerswitcher===true){i3GEO.editorOL.ativaLayerSwitcher()}if(i3GEO.editorOL.ativarodadomouse===false){i3GEO.editorOL.desativaRodaDoMouse()}if(i3GEO.editorOL.numzoom!==""){i3GEO.editorOL.mapa.setOptions({numZoomLevels:i3GEO.editorOL.numzoom})}if(i3GEO.editorOL.maxext!==""){i3GEO.editorOL.mapa.setOptions({maxExtent:i3GEO.editorOL.maxext})}if(i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}},criaLayerGrafico:function(){i3GEO.desenho.openlayers.criaLayerGrafico()},layersLigados:function(){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,ins=[],i;for(i=0;i<nlayers;i++){if(layers[i].visibility===true){ins.push(layers[i])}}return ins},layersClonados:function(paramsLayers){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].params&&layers[i].params.CLONETMS===paramsLayers){return(layers[i])}}return false},layertms2wms:function(tms){var layer,url;url=tms.url.replace("&cache=sim","&DESLIGACACHE=sim");url=url.replace("&Z=${z}&X=${x}&Y=${y}","");layer=new OpenLayers.Layer.WMS(tms.layername+"_clone",url,{layers:tms.name,transparent:true},{gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:true,singleTile:true});return layer},removeClone:function(){var nome=i3GEO.editorOL.layerAtivo().layername+"_clone",busca=i3GEO.editorOL.mapa.getLayersByName(nome);if(busca.length>0){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.mapa.getLayersByName(camada.name)[0],false)}},coordenadas:function(){var idcoord=i3GEO.editorOL.mapa.getControlsBy("separator"," ");if(idcoord[0]){i3GEO.editorOL.mapa.events.register("mousemove",i3GEO.editorOL.mapa,function(e){var p,lonlat,d;if(navm){p=new OpenLayers.Pixel(e.x,e.y)}else{p=e.xy}lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(p);d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{$i(idcoord[0].id).innerHTML="Long: "+d[0]+"<br>Lat: "+d[1]}catch(e){}})}},criaJanelaBusca:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,ins,combo="<select id=i3GEOOLlistaTemasBusca ><option value=''>----</option>";for(i=0;i<nlayers;i++){combo+="<option value='"+i+"' >"+layers[i].name+"</option>"}combo+="</select>";ins="<div class=paragrafo >Tema:<br>"+combo;ins+="<br>Item:<br><span id=i3GEOOLcomboitens ></span>";ins+="<br>Procurar por:<br><input type=text size=20 id=i3GEOOLpalavraBusca >";ins+="<br><br><input type=button value='Procurar' id='i3GEOOLbotaoBusca' ></div>";ins+="<br>Resultado:<br><span id=i3GEOOLcomboresultado ></span>";try{YAHOO.namespace("procura.container");YAHOO.procura.container.panel=new YAHOO.widget.Panel("panelprocura",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.procura.container.panel.setHeader("Encontre no mapa");YAHOO.procura.container.panel.setBody(ins);YAHOO.procura.container.panel.setFooter("");YAHOO.procura.container.panel.render(document.body);YAHOO.procura.container.panel.center();document.getElementById("i3GEOOLbotaoBusca").onclick=function(){var layer=i3GEO.editorOL.layerAtivo(),item=document.getElementById("i3GEOOLbuscaItem").value,palavra=document.getElementById("i3GEOOLpalavraBusca").value;if(item===""||palavra===""){alert("Escolha o item e o texto de busca");return}i3GEO.editorOL.busca(layer,item,palavra,"i3GEOOLcomboresultado")};document.getElementById("i3GEOOLlistaTemasBusca").onchange=function(){i3GEO.editorOL.ativaTema(this.value);document.getElementById("i3GEOOLcomboitens").innerHTML="...";i3GEO.editorOL.listaItens(i3GEO.editorOL.layerAtivo(),"i3GEOOLcomboitens","i3GEOOLbuscaItem")}}catch(e){}},criaComboTemas:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,nometema="",temp,combo="<select id=i3GEOOLlistaTemasAtivos style=width:235px; >";for(i=0;i<nlayers;i++){nometema="";if(i3GEO.arvoreDeCamadas&&i3GEO.arvoreDeCamadas.CAMADAS){temp=i3GEO.arvoreDeCamadas.pegaTema(layers[i].name,"","name");if(temp!=""){nometema=temp.tema+" - "}}combo+="<option value='"+i+"' >"+nometema+layers[i].name+"</option>"}combo+="</select>";return combo},atualizaJanelaAtivaTema:function(){var combo=i3GEO.editorOL.criaComboTemas();YAHOO.temaativo.container.panel.setBody(combo);document.getElementById("i3GEOOLlistaTemasAtivos").onchange=function(){if(botaoIdentifica){botaoIdentifica.layers=[i3GEO.editorOL.layersLigados()[this.value]]}}},criaJanelaAtivaTema:function(){var temp;if(!document.getElementById("paneltemaativo")){YAHOO.namespace("temaativo.container");YAHOO.temaativo.container.panel=new YAHOO.widget.Panel("paneltemaativo",{zIndex:20000,iframe:true,width:"250px",visible:false,draggable:true,close:true});YAHOO.temaativo.container.panel.setBody("");if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.temaativo.container.panel.setHeader("Tema ativo<div id='paneltemaativo_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.temaativo.container.panel.setHeader("Tema ativo")}YAHOO.temaativo.container.panel.setFooter("");YAHOO.temaativo.container.panel.render(document.body);YAHOO.temaativo.container.panel.show();YAHOO.temaativo.container.panel.center();i3GEO.editorOL.atualizaJanelaAtivaTema();YAHOO.util.Event.addListener(YAHOO.temaativo.container.panel.close,"click",function(){i3GEOpanelEditor.deactivate();i3GEOpanelEditor.activate();if(i3GEO.eventos&&i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")>0){i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()")}});if(typeof i3GEO!=undefined&&i3GEO!=""){if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEO.editorOL.atualizaJanelaAtivaTema()")}}temp=$i("paneltemaativo_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("paneltemaativo")}}}else{YAHOO.temaativo.container.panel.show();i3GEO.editorOL.atualizaJanelaAtivaTema()}},ativaTema:function(id){document.getElementById("i3GEOOLlistaTemasAtivos").value=id},layerAtivo:function(){var id=document.getElementById("i3GEOOLlistaTemasAtivos");if(id){id=id.value}else{id=i3GEO.temaAtivo}if(id==""){return[]}else{return i3GEO.editorOL.layersLigados()[id]}},listaItens:function(layer,idonde,idobj){if(!layer){return}if(!layer.params){return}var u=layer.url+"&request=describefeaturetype&service=wfs&version=1.0.0";u+="&typename="+layer.params.LAYERS;document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.WFSDescribeFeatureType({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),prop=gml.featureTypes[0].properties,nprop=prop.length,i,combo="<select id="+idobj+" ><option value=''>----</option>";for(i=0;i<nprop;i++){combo+="<option value="+prop[i].name+" >"+prop[i].name+"</option>"}combo+="</select>";document.getElementById(idonde).innerHTML=combo},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},busca:function(layer,item,palavra,onde){document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";var u=layer.url+"&request=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layer.params.LAYERS;u+="&filter=<Filter><PropertyIsLike wildcard=* singleChar=. escape=! ><PropertyName>"+item+"</PropertyName><Literal>*"+palavra+"*</Literal></PropertyIsLike></Filter>";document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";document.getElementById(onde).innerHTML="...";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),ngml=gml.length,i,ins="<select onchange='i3GEO.editorOL.zoomPara(this.value)'>";ins+="<option value=''>---</option>";for(i=0;i<ngml;i++){eval("var valor = gml[i].data."+item);var bounds=gml[i].geometry.getBounds();bounds=bounds.toBBOX();ins+="<option value='"+bounds+"'>"+valor+"</option>"}ins+="</select>";document.getElementById(onde).innerHTML=ins},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},zoomPara:function(bbox){var b=new OpenLayers.Bounds.fromString(bbox);i3GEO.editorOL.mapa.zoomToExtent(b)},mostraLegenda:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,ins="",i;for(i=0;i<nlayers;i++){try{if(layers[i].isBaseLayer===false){var url=layers[i].getFullRequestString({"request":"getlegendgraphic"});if(i3GEO.editorOL.legendahtml===true){url=url.replace("image%2Fpng","text/html");ins+=layers[i].name+"<br><div id=legendaL_"+i+" ></div><br>";eval("var f = function(retorno){document.getElementById('legendaL_"+i+"').innerHTML = retorno.responseText;};");var config={method:"GET",url:url,callback:f};OpenLayers.Request.issue(config)}else{url=url.replace("LAYERS","LAYER");ins+=layers[i].name+"<br><img src='"+url+"' /><br>"}}}catch(e){}}if(!document.getElementById("panellegendaeditorOL")){YAHOO.namespace("legendaeditorOL.container");YAHOO.legendaeditorOL.container.panel=new YAHOO.widget.Panel("panellegendaeditorOL",{zIndex:20000,iframe:true,width:"auto",visible:false,draggable:true,close:true});YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.setHeader("Legenda");YAHOO.legendaeditorOL.container.panel.setFooter("");YAHOO.legendaeditorOL.container.panel.render(document.body);YAHOO.legendaeditorOL.container.panel.show();YAHOO.legendaeditorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close,"click",function(){})}else{YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.show()}},captura:function(lonlat){var layers=[i3GEO.editorOL.layerAtivo()],xy=lonlat.split(","),u=layers[0].url+"&REQUEST=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS;u=u.replace("&cache=sim","&DESLIGACACHE=sim");u=u.replace("&Z=${z}&X=${x}&Y=${y}","");xy[0]=xy[0]*1;xy[1]=xy[1]*1;var poligono=(xy[0]-0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1);u+="&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>";document.body.style.cursor="wait";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="wait"}OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}var i,n,f,fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText);n=gml.length;for(i=0;i<n;i++){f=gml[i];f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,registros:f["attributes"]}}i3GEO.desenho.layergrafico.addFeatures(gml)},failure:function(){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}alert("Erro")}})},salvaGeometrias:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="";if(n>0){if($i("panelsalvageometrias")){YAHOO.salvaGeometrias.container.panel=YAHOO.i3GEO.janela.manager.find("panelsalvageometrias");YAHOO.salvaGeometrias.container.panel.show();YAHOO.salvaGeometrias.container.panel.bringToTop()}else{try{YAHOO.namespace("salvaGeometrias.container");YAHOO.salvaGeometrias.container.panel=new YAHOO.widget.Panel("panelsalvageometrias",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.salvaGeometrias.container.panel.setHeader("Geometrias");YAHOO.salvaGeometrias.container.panel.setBody("");YAHOO.salvaGeometrias.container.panel.setFooter("");YAHOO.salvaGeometrias.container.panel.render(document.body);YAHOO.salvaGeometrias.container.panel.center();if(YAHOO.i3GEO.janela){YAHOO.i3GEO.janela.manager.register(YAHOO.salvaGeometrias.container.panel)}YAHOO.salvaGeometrias.container.panel.show()}catch(e){}}ins+="<p class=paragrafo >Foram encontrada(s) "+n+" geometria(s) selecionada(s) </p>";ins+="<p class=paragrafo ><a href='#' onclick='i3GEO.editorOL.listaGeometriasSel()' >Listar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='"+i3GEO.editorOL.nomeFuncaoSalvar+"' >Salvar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>";YAHOO.salvaGeometrias.container.panel.setBody(ins)}else{alert("Selecione pelo menos um elemento")}},exportarSHP:function(){i3GEO.editorOL.processageo("converteSHP")},listaGeometriasSel:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="",i,a,w,g;for(i=0;i<n;i++){g=geos[i];ins+="<b>Geometria: "+i+"</b><br>"+i3GEO.editorOL.google2wgs(g.geometry)+"<br><br>";ins+="<b>Atributos: "+i+"</b><br>";a=g.attributes;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}if(g.attributes.registros){ins+="<b>Registros: "+i+"</b><br>";a=g.attributes.registros;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}}}w=window.open();w.document.write(ins);w.document.close()},testeSalvar:function(){alert("Funcao nao disponivel. Defina o nome da funcao em i3GEO.editorOL.nomeFuncaoSalvar ")},salvaGeo:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,funcaoOK=function(){if(geos[0].geometry){var registros="",valorunico="",nometema=$i("editorOLcomboTemaEditavel").value,key="",tema,redesenha,p,g=i3GEO.editorOL.google2wgs(geos[0].geometry);if(nometema==""){return}tema=i3GEO.arvoreDeCamadas.pegaTema(nometema,"","name");if(geos[0].attributes.registros){registros=geos[0].attributes.registros;for(key in registros){if(registros[key]&&key==tema.colunaidunico){valorunico=registros[key]}}}redesenha=function(retorno){i3GEO.janela.fechaAguarde("aguardeSalvaPonto");i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);i3GEO.Interface.atualizaTema("",nometema)};i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardeSalvaPonto","Adicionando...");i3GEO.janela.AGUARDEMODAL=false;if(valorunico==""){p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&tema="+nometema+"&wkt="+g)}else{p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=atualizaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&idunico="+valorunico+"&tema="+nometema+"&wkt="+g)}}},funcaoCombo=function(obj){$i("editorOLondeComboTemaEditavel").innerHTML=obj.dados},texto="Salvar no tema:<br><div id=editorOLondeComboTemaEditavel ></div><br><br>";if(n!=1){i3GEO.janela.tempoMsg("Selecione apenas uma figura")}else{i3GEO.janela.confirma(texto,300,"Salva","Cancela",funcaoOK);i3GEO.util.comboTemas("editorOLcomboTemaEditavel",funcaoCombo,"editorOLondeComboTemaEditavel","",false,"editavel")}},criaBotoes:function(botoes){var sketchSymbolizers={"Point":{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},"Line":{strokeWidth:3,strokeOpacity:1,strokeColor:"#666666",strokeDashstyle:"dash"},"Polygon":{strokeWidth:2,strokeOpacity:1,strokeColor:"#666666",fillColor:"white",fillOpacity:0.3}},style=new OpenLayers.Style(),styleMap=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:3}},{extendDefault:false}),adiciona=false,button,controles=[];style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEOpanelEditor=new OpenLayers.Control.Panel({displayClass:"olControlEditingToolbar1 noprint",saveState:false,activateControl:function(c){this.deactivate();this.activate();try{i3GEO.editorOL.ModifyFeature.deactivate();if(i3GEO&&i3GEO.barraDeBotoes){i3GEO.barraDeBotoes.ativaPadrao()}}catch(e){}if(!c.trigger){c.activate()}else{c.trigger.call()}}});if(botoes.procura===true){button=new OpenLayers.Control.Button({displayClass:"editorOLprocura",trigger:function(){YAHOO.procura.container.panel.show()},title:"procura",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.pan===true){controles.push(new OpenLayers.Control.Navigation({title:"deslocar",displayClass:"editorOLpan",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoombox===true){controles.push(new OpenLayers.Control.ZoomBox({title:"zoombox",displayClass:"editorOLzoombox",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoomtot===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomtot",trigger:function(){if(i3GEO.editorOL.mapext&&i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}},title:"ajusta extensao",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomin===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomin",trigger:function(){i3GEO.editorOL.mapa.zoomIn()},title:"aproxima",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomout===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomout",trigger:function(){i3GEO.editorOL.mapa.zoomOut()},title:"afasta",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.legenda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlegenda",trigger:function(){i3GEO.editorOL.mostraLegenda()},title:"legenda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.distancia===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLdistancia",title:"distancia",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units,measure=event.measure;alert("Dist&acirc;ncia: "+measure.toFixed(3)+" "+units)}});controles.push(button);adiciona=true}if(botoes.area===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLarea",title:"area",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units;var measure=event.measure;alert("&Aacute;rea: "+measure.toFixed(3)+" "+units+" quadrados")}});controles.push(button);adiciona=true}if(botoes.identifica===true){botaoIdentifica=new OpenLayers.Control.WMSGetFeatureInfo({maxFeatures:1,infoFormat:'text/plain',layers:[i3GEO.editorOL.layerAtivo()],queryVisible:true,title:"identifica",type:OpenLayers.Control.TYPE_TOOL,displayClass:"editorOLidentifica",eventListeners:{getfeatureinfo:function(event){var lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),lonlattexto="<hr>",formata;if(botoes.linha===true||botoes.ponto===true||botoes.poligono===true||botoes.edita===true){lonlattexto+="<pre><span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>edita geometria</span></pre><br>"}formata=function(texto){var temp,temp1,n,i,f=[],textoN=texto.split(":");try{if(textoN.length>1){temp=textoN[2].replace(/\n\r/g,"");temp=temp.replace(/'/g,"");temp=temp.replace(/\n/g,"|");temp=temp.replace(/_/g," ");temp=temp.replace(/=/g,":");temp=temp.split("|");n=temp.length;for(i=0;i<n;i++){temp1=temp[i].replace(/^\s+/,"");temp1=temp1.replace(/\s+$/,"");if(temp1!="")f.push(temp1)}texto=f.join("<br><br>")}}catch(e){}return texto};i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("chicken",i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),null,"<div style=text-align:left >"+lonlattexto+"<pre>"+formata(event.text)+"</pre></div>",null,true));i3GEO.editorOL.removeClone()},beforegetfeatureinfo:function(event){var ativo=[i3GEO.editorOL.layerAtivo()];if(ativo[0].CLASS_NAME=="OpenLayers.Layer.TMS"||ativo[0].CLASS_NAME=="OpenLayers.Layer.OSM"){ativo=[i3GEO.editorOL.layertms2wms(ativo[0])]}ativo[0].projection=new OpenLayers.Projection("EPSG:4326");event.object.layers=ativo;botaoIdentifica.layers=ativo;botaoIdentifica.url=ativo[0].url},activate:function(){i3GEO.editorOL.criaJanelaAtivaTema()}}});controles.push(botaoIdentifica);adiciona=true}if(botoes.linha===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{displayClass:"editorOLlinha",title:"digitalizar linha",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.ponto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLponto",title:"digitalizar ponto",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=[];if(i3GEO.editorOL.simbologia.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=i3GEO.editorOL.simbologia.externalGraphic;style_mark.graphicWidth=i3GEO.editorOL.simbologia.graphicWidth;style_mark.graphicHeight=i3GEO.editorOL.simbologia.graphicHeight;style_mark.fillOpacity=i3GEO.editorOL.simbologia.opacidade;f=new OpenLayers.Feature.Vector(feature,null,style_mark)}else{f=new OpenLayers.Feature.Vector(feature)}f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,externalGraphic:i3GEO.editorOL.simbologia.externalGraphic,graphicHeight:i3GEO.editorOL.simbologia.graphicHeight,graphicWidth:i3GEO.editorOL.simbologia.graphicWidth};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.poligono===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLpoligono",title:"digitalizar poligono",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.texto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLtexto",title:"incluir texto",type:OpenLayers.Control.TYPE_TOOL,persist:true,callbacks:{done:function(feature){var texto=window.prompt("Texto",""),label=new OpenLayers.Feature.Vector(feature);label["attributes"]={opacidade:0.1,fillColor:"white",strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,texto:texto,pointRadius:2,graphicName:"square",strokeColor:"black",fontColor:i3GEO.editorOL.simbologia.fontColor,fontSize:i3GEO.editorOL.simbologia.fontSize,fontFamily:"Arial",fontWeight:"bold",labelAlign:"rt"};if(texto&&texto!==""){i3GEO.desenho.layergrafico.addFeatures([label])}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.edita===true&&botoes.corta===true&&i3GEO.php){i3GEO.editorOL.CortaFeature=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLcorta",title:"corta figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length!=1){alert("Selecione primeiro um elemento para ser cortado");i3GEO.editorOL.CortaFeature.deactivate()}else{i3GEO.editorOL.CortaFeature.activate()}},callbacks:{done:function(feature){var temp,sel=i3GEO.desenho.layergrafico.selectedFeatures[0].geometry,corta=feature;temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.cortador");if(retorno!=""&&retorno.data&&retorno.data!=""){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}};i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando");i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference")}}});controles.push(i3GEO.editorOL.CortaFeature);adiciona=true}if(botoes.edita===true){i3GEO.editorOL.ModifyFeature=new OpenLayers.Control.ModifyFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLedita",title:"modifica figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,mode:OpenLayers.Control.ModifyFeature.RESHAPE,standalone:false,createVertices:true,styleMap:"default",vertexRenderIntent:"vertex"});controles.push(i3GEO.editorOL.ModifyFeature);adiciona=true}if(botoes.edita===true&&botoes.listag===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlistag",trigger:function(){i3GEO.editorOL.listaGeometrias()},title:"lista geometrias",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.frente===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfrente",trigger:function(){i3GEO.editorOL.trazParaFrente();if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},title:"traz para frente",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.tools===true&&i3GEO.php){button=new OpenLayers.Control.Button({displayClass:"editorOLtools",trigger:function(){if(i3GEO.php){i3GEO.editorOL.ferramentas()}else{i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()")}},title:"ferramentas",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.selecao===true){i3GEO.editorOL.selbutton=new OpenLayers.Control.SelectFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLselecao",title:"seleciona elemento",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,multiple:false,hover:false,toggleKey:"ctrlKey",multipleKey:"shiftKey",box:false});controles.push(i3GEO.editorOL.selbutton);adiciona=true}if(botoes.apaga===true){button=new OpenLayers.Control.Button({displayClass:"editorOLapaga",trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length>0){var x=window.confirm("Exclui os elementos selecionados?");if(x){i3GEO.editorOL.guardaBackup();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}else{alert("Selecione pelo menos um elemento")}},title:"apaga selecionados",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.propriedades===true){button=new OpenLayers.Control.Button({displayClass:"editorOLpropriedades",trigger:function(){i3GEO.editorOL.propriedades()},title:"propriedades",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.salva===true){button=new OpenLayers.Control.Button({displayClass:"editorOLsalva",trigger:function(){i3GEO.editorOL.salvaGeometrias()},title:"salva",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.ajuda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLajuda",trigger:function(){try{window.open(i3GEO.configura.locaplic+"/mashups/openlayers_ajuda.php")}catch(e){window.open("openlayers_ajuda.php")}},title:"ajuda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.fecha===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfecha",trigger:function(){var temp=window.confirm("Remove a edicao?");if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}i3GEOpanelEditor.destroy();try{YAHOO.temaativo.container.panel.destroy()}catch(e){}try{YAHOO.procura.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.listaGeometrias.panel.destroy()}catch(e){}try{YAHOO.editorOL.ferramentas.panel.destroy()}catch(e){}try{YAHOO.legendaeditorOL.container.panel.destroy()}catch(e){}try{YAHOO.salvaGeometrias.container.panel.destroy()}catch(e){}if(temp===true){try{if(i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.removeLayer(i3GEO.desenho.layergrafico);delete(i3GEO.desenho.layergrafico)}if(i3GEO.editorOL.backup){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.backup);delete(i3GEO.editorOL.backup)}}catch(e){}}},title:"fecha editor",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}i3GEOOLsnap=new OpenLayers.Control.Snapping({layer:i3GEO.desenho.layergrafico});i3GEOOLsplit=new OpenLayers.Control.Split({layer:i3GEO.desenho.layergrafico,source:i3GEO.desenho.layergrafico,tolerance:0.0001,eventListeners:{beforesplit:function(event){i3GEO.editorOL.guardaBackup()},aftersplit:function(event){i3GEO.editorOL.flashFeatures(event.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}});if(adiciona===true){i3GEOpanelEditor.addControls(controles);i3GEO.editorOL.mapa.addControl(i3GEOpanelEditor)}},mudaSimbolo:function(estilo,id){var valor=$i(id).value,geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,i;i3GEO.editorOL.simbologia[estilo]=valor;for(i=0;i<n;i++){geos[i].attributes[estilo]=valor;geos[i].style[estilo]=valor}},adicionaMarcas:function(){if(i3GEO.editorOL.pontos.length===0){return}var SHADOW_Z_INDEX=10,MARKER_Z_INDEX=11,layer=new OpenLayers.Layer.Vector("pontos",{styleMap:new OpenLayers.StyleMap({externalGraphic:i3GEO.editorOL.marca,backgroundGraphic:"../pacotes/openlayers/img/marker_shadow.png",backgroundXOffset:0,backgroundYOffset:-7,graphicZIndex:MARKER_Z_INDEX,backgroundGraphicZIndex:SHADOW_Z_INDEX,pointRadius:10}),isBaseLayer:false,rendererOptions:{yOrdering:true},displayInLayerSwitcher:true,visibility:true}),index,x=[],y=[],features=[];for(index=0;index<i3GEO.editorOL.pontos.length;index=index+2){x.push(i3GEO.editorOL.pontos[index]);y.push(i3GEO.editorOL.pontos[index+1])}for(index=0;index<x.length;index++){features.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x[index],y[index])))}layer.addFeatures(features);i3GEO.editorOL.mapa.addLayer(layer)},adicionaKml:function(){var temp,n,i,id,url;n=i3GEO.editorOL.kml.length;for(i=0;i<n;i++){id="kml"+i;url=i3GEO.editorOL.kml[i];eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3GEO.editorOL.mapa.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,g,html="";if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3GEO.editorOL.mapa.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(var j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}}},propriedades:function(){if(!document.getElementById("panelpropriedadesEditor")){YAHOO.namespace("editorOL.container");YAHOO.editorOL.container.panel=new YAHOO.widget.Panel("panelpropriedadesEditor",{zIndex:20000,iframe:true,width:"350px",height:"250px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo ><b>Estilos (utilize a cor no formato r,g,b):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td>Cor do contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeColor\',\'i3GEOEditorOLcorContorno\')" type="text" style="cursor:text" id="i3GEOEditorOLcorContorno" size="12" value="'+i3GEO.editorOL.simbologia.strokeColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorContorno\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor do preenchimento</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fillColor\',\'i3GEOEditorOLcorPre\')" type="text" style="cursor:text" id="i3GEOEditorOLcorPre" size="12" value="'+i3GEO.editorOL.simbologia.fillColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorPre\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontColor\',\'i3GEOEditorOLcorFonte\')" type="text" style="cursor:text" id="i3GEOEditorOLcorFonte" size="12" value="'+i3GEO.editorOL.simbologia.fontColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorFonte\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Tamanho da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontSize\',\'i3GEOEditorOLfontsize\')" type="text" style="cursor:text" id="i3GEOEditorOLfontsize" size="3" value="'+i3GEO.editorOL.simbologia.fontSize+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Opacidade (de 0 a 1)</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'opacidade\',\'i3GEOEditorOLopacidade\')" type="text" style="cursor:text" id="i3GEOEditorOLopacidade" size="3" value="'+i3GEO.editorOL.simbologia.opacidade+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura da linha/contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeWidth\',\'i3GEOEditorOLlarguraLinha\')" type="text" style="cursor:text" id="i3GEOEditorOLlarguraLinha" size="2" value="'+i3GEO.editorOL.simbologia.strokeWidth+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Url de uma figura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'externalGraphic\',\'i3GEOEditorOLexternalGraphic\')" type="text" style="cursor:text" id="i3GEOEditorOLexternalGraphic" size="22" value="'+i3GEO.editorOL.simbologia.externalGraphic+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura e altura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicWidth\',\'i3GEOEditorOLgraphicWidth\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicWidth" size="4" value="'+i3GEO.editorOL.simbologia.graphicWidth+'" />&nbsp;<input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicHeight\',\'i3GEOEditorOLgraphicHeight\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicHeight" size="4" value="'+i3GEO.editorOL.simbologia.graphicHeight+'" /></td><td></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Ajusta n� em edi&ccedil;&atilde;o para o(a):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td></td><td>n�</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_node" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_nodeTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_vertex" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_vertexTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Divide intersec&ccedil;&atilde;o ao digitalizar</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.split()" type="checkbox" id="edge_split_toggle" /></td><td>borda</td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Opera&ccedil;&atilde;o ativada pelo bot&atilde;o de modifica&ccedil;&atilde;o da figura</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input checked style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESHAPE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera figura</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESIZE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera tamanho</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.ROTATE;" type="radio" name=i3geoOLtipoEdita /></td><td>rotaciona</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.DRAG;" type="radio" name=i3geoOLtipoEdita /></td><td>desloca</td>'+' </tr>'+'</table>';YAHOO.editorOL.container.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.container.panel.setHeader("Propriedades<div id='panelpropriedadesEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.container.panel.setHeader("Propriedades")}YAHOO.editorOL.container.panel.setFooter("");YAHOO.editorOL.container.panel.render(document.body);YAHOO.editorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close,"click",function(){});temp=$i("panelpropriedadesEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelpropriedadesEditor")}}}YAHOO.editorOL.container.panel.show();temp=$i("panelpropriedadesEditor").getElementsByTagName("div");if(temp&&temp[2]){temp[2].style.overflow="auto"}},listaGeometrias:function(){if(!document.getElementById("panellistagEditor")){YAHOO.namespace("editorOL.listaGeometrias");YAHOO.editorOL.listaGeometrias.panel=new YAHOO.widget.Panel("panellistagEditor",{zIndex:20000,iframe:true,width:"320px",visible:false,draggable:true,close:true});if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias <div id='panellistagEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias")}YAHOO.editorOL.listaGeometrias.panel.setFooter("");YAHOO.editorOL.listaGeometrias.panel.render(document.body);YAHOO.editorOL.listaGeometrias.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.listaGeometrias.panel.close,"click",function(){YAHOO.editorOL.listaGeometrias.panel.destroy()});temp=$i("panellistagEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panellistagEditor")}}}else{YAHOO.editorOL.listaGeometrias.panel.render(document.body)}var g,temp,geos=i3GEO.desenho.layergrafico.features,n=geos.length,ins="<table class=lista4 >";ins+="<tr><td><i>Geometrias</i></td><td><i>Op&ccedil;&otilde;es</i></td><td></td><td></td></tr>";while(n>0){n-=1;g=geos[n].geometry;ins+="<tr><td>"+g.CLASS_NAME+"</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.selFeature("+n+")'>seleciona</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.unselFeature("+n+")'>limpa</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.flashFeaturesI("+n+")'>brilha</td></tr>"}ins+="</table>";if(geos.length===0){ins="Nenhum elemento gr&aacute;fico encontrado. Utilize as op&ccedil;&otilde;es de cria&ccedil;&atilde;o de geometrias."}YAHOO.editorOL.listaGeometrias.panel.show();if(i3GEO.configura){temp=$i("panellistagEditor").getElementsByTagName("div")[2]}else{temp=$i("panellistagEditor").getElementsByTagName("div")[1]}temp.style.overflow="auto";temp.style.height="100px";temp.innerHTML=ins},ferramentas:function(){if(!document.getElementById("panelferramentasEditor")){YAHOO.namespace("editorOL.ferramentas");YAHOO.editorOL.ferramentas.panel=new YAHOO.widget.Panel("panelferramentasEditor",{zIndex:20000,iframe:true,width:"300px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo >Opera&ccedil;&otilde;es sobre as figuras selecionadas:</p>'+'<select onchange="i3GEO.editorOL.processageo(this.value);this.value = \'\'" >'+' <option value="">---</option>'+' <option value=union >Uni&atilde;o</option>';if(i3GEO.php){ins+=' <option value=intersection >Intersec&ccedil;&atilde;o</option>'+' <option value=convexhull >Convex hull</option>'+' <option value=boundary >Bordas</option>'+' <option value=difference >Diferen&ccedil;a</option>'+' <option value=symdifference >Diferen&ccedil;a sim&eacute;trica</option>'}ins+='</select>'+'<br><br><a class=paragrafo href=# onclick="i3GEO.desenho.layergrafico.destroyFeatures()" >Apaga tudo</a>';YAHOO.editorOL.ferramentas.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas <div id='panelferramentasEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas")}YAHOO.editorOL.ferramentas.panel.setFooter("");YAHOO.editorOL.ferramentas.panel.render(document.body);YAHOO.editorOL.ferramentas.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.ferramentas.panel.close,"click",function(){});temp=$i("panelferramentasEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelferramentasEditor")}}}else{YAHOO.editorOL.ferramentas.panel.render(document.body)}YAHOO.editorOL.ferramentas.panel.show()},snap:function(){var target=i3GEOOLsnap.targets[0],tipos=["node","vertex","edge"],ntipos=tipos.length,i,temp,ativa=false;i3GEOOLsnap.deactivate();for(i=0;i<ntipos;i++){temp=$i("target_"+tipos[i]);target[tipos[i]]=temp.checked;if(temp.checked===true){ativa=true}temp=$i("target_"+tipos[i]+"Tolerance");target[tipos[i]+"Tolerance"]=temp.value}if(ativa===true){i3GEOOLsnap.activate()}},split:function(){i3GEOOLsplit.deactivate();var temp=$i("edge_split_toggle");if(temp.checked===true){i3GEOOLsplit.activate()}},processageo:function(operacao){if(operacao===""){return}var geosel=i3GEO.desenho.layergrafico.selectedFeatures,polis,linhas,pontos,temp;if(geosel.length>0){polis=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Polygon");linhas=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.LineString");pontos=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Point");temp=function(retorno){if(i3GEO.janela){i3GEO.janela.fechaAguarde("i3GEO.editorPoli");i3GEO.janela.fechaAguarde("i3GEO.editorLinhas");i3GEO.janela.fechaAguarde("i3GEO.editorPontos")}if(retorno!=""&&retorno.data&&retorno.data!=""&&operacao!="converteSHP"){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}if(operacao==="converteSHP"){i3GEO.atualiza();i3GEO.janela.minimiza("paneltemaativo")}};if(operacao==="union"&&!i3GEO.php){if(polis.length>0){temp=i3GEO.editorOL.uniaojts(polis);i3GEO.editorOL.substituiFeaturesSel(temp)}if(linhas.length>0){temp=i3GEO.editorOL.uniaojts(linhas);i3GEO.editorOL.substituiFeaturesSel(temp)}if(pontos.length>0){temp=i3GEO.editorOL.uniaojts(p);i3GEO.editorOL.substituiFeaturesSel(temp)}}else{if(polis.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos");i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao)}if(linhas.length>0){i3GEO.janela.abreAguarde("i3GEO.editorLinhas","Linhas");i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao)}if(pontos.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPontos","Pontos");i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao)}}return}else{alert("Selecione pelo menos dois elementos")}},uniaojts:function(geoms){var n=geoms.length,rwkt=new jsts.io.WKTReader(),wwkt=new jsts.io.WKTWriter(),fwkt=new OpenLayers.Format.WKT(),g,i,uniao;if(n>1){uniao=(fwkt.read(geoms[0]).geometry).toString();uniao=rwkt.read(uniao);for(i=1;i<=n;i++){g=(fwkt.read(geoms[i]).geometry).toString();uniao=uniao.union(rwkt.read(g))}uniao=wwkt.write(uniao);return[fwkt.read(uniao)]}else{return false}},retornaGeometriasTipo:function(features,tipo){var n=features.length,lista=[],i,temp;for(i=0;i<n;i++){temp=features[i].geometry;if(temp.CLASS_NAME==tipo){lista.push(temp)}}return lista},guardaBackup:function(){return;if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}else{i3GEO.editorOL.backup.removeFeatures(i3GEO.editorOL.backup.features)}i3GEO.editorOL.backup.addFeatures(i3GEO.desenho.layergrafico.features)},unselTodos:function(){var n,i;n=i3GEO.desenho.layergrafico.features.length;for(i=0;i<n;i++){i3GEO.desenho.layergrafico.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[i])}},unselTodosBackup:function(){var n,i;n=i3GEO.editorOL.backup.features.length;for(i=0;i<n;i++){i3GEO.editorOL.backup.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.backup.features[i])}},restauraBackup:function(){if(i3GEO.editorOL.backup.features.length>0){i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features)}if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},substituiFeaturesSel:function(wkt){i3GEO.editorOL.guardaBackup();try{var f,fwkt=new OpenLayers.Format.WKT();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);f=fwkt.read(wkt);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}catch(e){i3GEO.editorOL.restauraBackup()}},adicionaFeatureWkt:function(wkt,atributos){var f,fwkt=new OpenLayers.Format.WKT();if(atributos.externalGraphic&&atributos.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=atributos.externalGraphic;style_mark.graphicWidth=atributos.graphicWidth;style_mark.graphicHeight=atributos.graphicHeight;style_mark.fillOpacity=atributos.opacidade;f=fwkt.read(wkt);f["attributes"]=atributos;f["style"]=style_mark}else{f=fwkt.read(wkt);f["attributes"]=atributos}i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},flashFeaturesI:function(index){i3GEO.editorOL.flashFeatures([i3GEO.desenho.layergrafico.features[index]],0)},flashFeatures:function(features,index){if(!index){index=0}var current=features[index];if(current&&current.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(features[index],"select")}var prev=features[index-1];if(prev&&prev.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(prev,"default")}++index;if(index<=features.length){window.setTimeout(function(){i3GEO.editorOL.flashFeatures(features,index)},75)}},selFeature:function(index){i3GEO.editorOL.selbutton.select(i3GEO.desenho.layergrafico.features[index])},unselFeature:function(index){i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[index])},carregajts:function(funcao){if(i3GEO.configura){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}else{i3GEO.util.scriptTag("../pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}},trazParaFrente:function(){var features=i3GEO.desenho.layergrafico.selectedFeatures;if(features.length>0){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false});i3GEO.editorOL.backup.addFeatures(features);i3GEO.editorOL.unselTodosBackup();i3GEO.desenho.layergrafico.removeFeatures(features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}else{alert("Selecione pelo menos um elemento")}},pegaControle:function(classe){var n=i3GEO.editorOL.controles.length,i;for(i=0;i<n;i++){if(i3GEO.editorOL.controles[i].CLASS_NAME===classe){return i3GEO.editorOL.controles[i]}}return false},ativaLayerSwitcher:function(){var ls=i3GEO.editorOL.pegaControle("OpenLayers.Control.LayerSwitcher");if(ls){ls.maximizeDiv.click()}},desativaRodaDoMouse:function(){var controls=i3GEO.editorOL.mapa.getControlsByClass('OpenLayers.Control.Navigation');for(var i=0;i<controls.length;++i){controls[i].disableZoomWheel()}},google2wgs:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84=new OpenLayers.Projection("EPSG:4326"),proj900913=new OpenLayers.Projection("EPSG:900913");return obj.transform(proj900913,projWGS84)}else{return obj}}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){var i3GEO={};navn=false;navm=false;$i=function(id){return document.getElementById(id)};app=navigator.appName.substring(0,1);if(app==='N'){navn=true}else{navm=true}OpenLayers.ImgPath="../pacotes/openlayers/img/";OpenLayers.Lang.setCode("pt-BR")}i3GEO.editorOL={simbologia:{opacidade:0.8,texto:"",fillColor:"250,180,15",strokeWidth:2,strokeColor:"250,150,0",pointRadius:4,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},backup:new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}),nomeFuncaoSalvar:"i3GEO.editorOL.salvaGeo()",e_oce:new OpenLayers.Layer.ArcGIS93Rest("ESRI Ocean Basemap","http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_ims:new OpenLayers.Layer.ArcGIS93Rest("ESRI Imagery World 2D","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_wsm:new OpenLayers.Layer.ArcGIS93Rest("ESRI World Street Map","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),ol_mma:new OpenLayers.Layer.WMS("Base cartogr&aacute;fica","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&",{layers:'baseraster',SRS:'EPSG:4618',FORMAT:'image/png'},{singleTile:false}),ol_wms:new OpenLayers.Layer.WMS("OpenLayers WMS","http://labs.metacarta.com/wms/vmap0",{layers:'basic'}),top_wms:new OpenLayers.Layer.WMS("Topon&iacute;mia MMA","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseref.map&",{layers:"base",FORMAT:'image/png'}),est_wms:new OpenLayers.Layer.WMS("Estados do Brasil","http://mapas.mma.gov.br/i3geo/ogc.php?tema=estadosl&",{layers:"estadosl",FORMAT:'image/png'}),fundo:"e_ims,e_wsm,ol_mma,ol_wms,top_wms,est_wms,e_oce",kml:[],layersIniciais:[],botoes:{'pan':true,'zoombox':true,'zoomtot':true,'zoomin':true,'zoomout':true,'legenda':true,'distancia':true,'area':true,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'listag':true,'corta':true,'apaga':true,'procura':true,'selecao':true,'salva':true,'ajuda':true,'propriedades':true,'fecha':false,'tools':true,'undo':false,'frente':false,'legenda':true,'rodadomouse':true},pontos:[],marca:"../pacotes/openlayers/img/marker-gold.png",controles:[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoomBar(),new OpenLayers.Control.LayerSwitcher({'ascending':false}),new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.MousePosition({'separator':' '}),new OpenLayers.Control.OverviewMap(),new OpenLayers.Control.KeyboardDefaults()],tiles:true,incluilayergrafico:true,ativalayerswitcher:false,ativarodadomouse:true,legendahtml:false,numzoom:12,maxext:"",mapext:new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081),mapa:"",inicia:function(){var single=false,alayers=[],fundo=(i3GEO.editorOL.fundo).split(","),nfundo=fundo.length,ncontroles=i3GEO.editorOL.controles.length,i,n;if(i3GEO.editorOL.tiles===false||i3GEO.editorOL.tiles==="false"){single=true}if(i3GEO.editorOL.ativalayerswitcher==="false"){i3GEO.editorOL.ativalayerswitcher=false}if(i3GEO.editorOL.ativalayerswitcher==="true"){i3GEO.editorOL.ativalayerswitcher=true}if(i3GEO.editorOL.ativarodadomouse==="false"){i3GEO.editorOL.ativarodadomouse=false}if(i3GEO.editorOL.ativarodadomouse==="true"){i3GEO.editorOL.ativarodadomouse=true}if(i3GEO.editorOL.legendahtml==="false"){i3GEO.editorOL.legendahtml=false}if(i3GEO.editorOL.legendahtml==="true"){i3GEO.editorOL.legendahtml=true}if(i3GEO.editorOL.incluilayergrafico==="false"){i3GEO.editorOL.incluilayergrafico=false}if(i3GEO.editorOL.incluilayergrafico==="true"){i3GEO.editorOL.incluilayergrafico=true}if(i3GEO.editorOL.incluilayergrafico===true){if(!i3GEO.desenho.layergrafico){i3GEO.editorOL.criaLayerGrafico()}}else{i3GEO.desenho.layergrafico="";i3GEO.editorOL.botoes.linha=false;i3GEO.editorOL.botoes.ponto=false;i3GEO.editorOL.botoes.poligono=false;i3GEO.editorOL.botoes.texto=false;i3GEO.editorOL.botoes.edita=false;i3GEO.editorOL.botoes.listag=false;i3GEO.editorOL.botoes.corta=false;i3GEO.editorOL.botoes.apaga=false;i3GEO.editorOL.botoes.selecao=false;i3GEO.editorOL.botoes.salva=false;i3GEO.editorOL.botoes.propriedades=false;i3GEO.editorOL.botoes.fecha=false;i3GEO.editorOL.botoes.tools=false;i3GEO.editorOL.botoes.undo=false;i3GEO.editorOL.botoes.frente=false}if(i3GEO.editorOL.mapa===""){alert("O objeto i3GEO.editorOL.mapa precisa ser criado com new OpenLayers.Map()");return}for(i=0;i<ncontroles;i++){i3GEO.editorOL.mapa.addControl(i3GEO.editorOL.controles[i])}if(i3GEO.editorOL.fundo!=""){for(i=nfundo-1;i>=0;i--){if(fundo[i]!=""){try{eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';");eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);");eval("i3GEO.editorOL."+fundo[i]+".singleTile = false;");eval("alayers.push(i3GEO.editorOL."+fundo[i]+");")}catch(e){if(alayers[0]){alayers[0].setVisibility(true)}}}}}i3GEO.editorOL.mapa.addLayers(alayers);if(i3GEO.editorOL.layersIniciais!==""){n=i3GEO.editorOL.layersIniciais.length;for(i=0;i<n;i++){i3GEO.editorOL.layersIniciais[i].singleTile=single;i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i])}}if(!i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}i3GEO.editorOL.adicionaKml();i3GEO.editorOL.adicionaMarcas();i3GEO.editorOL.coordenadas();i3GEO.editorOL.criaJanelaBusca();i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);if(i3GEO.editorOL.ativalayerswitcher===true){i3GEO.editorOL.ativaLayerSwitcher()}if(i3GEO.editorOL.ativarodadomouse===false){i3GEO.editorOL.desativaRodaDoMouse()}if(i3GEO.editorOL.numzoom!==""){i3GEO.editorOL.mapa.setOptions({numZoomLevels:i3GEO.editorOL.numzoom})}if(i3GEO.editorOL.maxext!==""){i3GEO.editorOL.mapa.setOptions({maxExtent:i3GEO.editorOL.maxext})}if(i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}},criaLayerGrafico:function(){i3GEO.desenho.openlayers.criaLayerGrafico()},layersLigados:function(){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,ins=[],i;for(i=0;i<nlayers;i++){if(layers[i].visibility===true){ins.push(layers[i])}}return ins},layersClonados:function(paramsLayers){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].params&&layers[i].params.CLONETMS===paramsLayers){return(layers[i])}}return false},layertms2wms:function(tms){var layer,url;url=tms.url.replace("&cache=sim","&DESLIGACACHE=sim");url=url.replace("&Z=${z}&X=${x}&Y=${y}","");layer=new OpenLayers.Layer.WMS(tms.layername+"_clone",url,{layers:tms.name,transparent:true},{gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:true,singleTile:true});return layer},removeClone:function(){var nome=i3GEO.editorOL.layerAtivo().layername+"_clone",busca=i3GEO.editorOL.mapa.getLayersByName(nome);if(busca.length>0){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.mapa.getLayersByName(camada.name)[0],false)}},coordenadas:function(){var idcoord=i3GEO.editorOL.mapa.getControlsBy("separator"," ");if(idcoord[0]){i3GEO.editorOL.mapa.events.register("mousemove",i3GEO.editorOL.mapa,function(e){var p,lonlat,d;if(navm){p=new OpenLayers.Pixel(e.x,e.y)}else{p=e.xy}lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(p);d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{$i(idcoord[0].id).innerHTML="Long: "+d[0]+"<br>Lat: "+d[1]}catch(e){}})}},criaJanelaBusca:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,ins,combo="<select id=i3GEOOLlistaTemasBusca ><option value=''>----</option>";for(i=0;i<nlayers;i++){combo+="<option value='"+i+"' >"+layers[i].name+"</option>"}combo+="</select>";ins="<div class=paragrafo >Tema:<br>"+combo;ins+="<br>Item:<br><span id=i3GEOOLcomboitens ></span>";ins+="<br>Procurar por:<br><input type=text size=20 id=i3GEOOLpalavraBusca >";ins+="<br><br><input type=button value='Procurar' id='i3GEOOLbotaoBusca' ></div>";ins+="<br>Resultado:<br><span id=i3GEOOLcomboresultado ></span>";try{YAHOO.namespace("procura.container");YAHOO.procura.container.panel=new YAHOO.widget.Panel("panelprocura",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.procura.container.panel.setHeader("Encontre no mapa");YAHOO.procura.container.panel.setBody(ins);YAHOO.procura.container.panel.setFooter("");YAHOO.procura.container.panel.render(document.body);YAHOO.procura.container.panel.center();document.getElementById("i3GEOOLbotaoBusca").onclick=function(){var layer=i3GEO.editorOL.layerAtivo(),item=document.getElementById("i3GEOOLbuscaItem").value,palavra=document.getElementById("i3GEOOLpalavraBusca").value;if(item===""||palavra===""){alert("Escolha o item e o texto de busca");return}i3GEO.editorOL.busca(layer,item,palavra,"i3GEOOLcomboresultado")};document.getElementById("i3GEOOLlistaTemasBusca").onchange=function(){i3GEO.editorOL.ativaTema(this.value);document.getElementById("i3GEOOLcomboitens").innerHTML="...";i3GEO.editorOL.listaItens(i3GEO.editorOL.layerAtivo(),"i3GEOOLcomboitens","i3GEOOLbuscaItem")}}catch(e){}},criaComboTemas:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,nometema="",temp,combo="<select id=i3GEOOLlistaTemasAtivos style=width:235px; >";for(i=0;i<nlayers;i++){nometema="";if(i3GEO.arvoreDeCamadas&&i3GEO.arvoreDeCamadas.CAMADAS){temp=i3GEO.arvoreDeCamadas.pegaTema(layers[i].name,"","name");if(temp!=""){nometema=temp.tema+" - "}}combo+="<option value='"+i+"' >"+nometema+layers[i].name+"</option>"}combo+="</select>";return combo},atualizaJanelaAtivaTema:function(){var combo=i3GEO.editorOL.criaComboTemas();YAHOO.temaativo.container.panel.setBody(combo);document.getElementById("i3GEOOLlistaTemasAtivos").onchange=function(){if(botaoIdentifica){botaoIdentifica.layers=[i3GEO.editorOL.layersLigados()[this.value]]}}},criaJanelaAtivaTema:function(){var temp;if(!document.getElementById("paneltemaativo")){YAHOO.namespace("temaativo.container");YAHOO.temaativo.container.panel=new YAHOO.widget.Panel("paneltemaativo",{zIndex:20000,iframe:true,width:"250px",visible:false,draggable:true,close:true});YAHOO.temaativo.container.panel.setBody("");if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.temaativo.container.panel.setHeader("Tema ativo<div id='paneltemaativo_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.temaativo.container.panel.setHeader("Tema ativo")}YAHOO.temaativo.container.panel.setFooter("");YAHOO.temaativo.container.panel.render(document.body);YAHOO.temaativo.container.panel.show();YAHOO.temaativo.container.panel.center();i3GEO.editorOL.atualizaJanelaAtivaTema();YAHOO.util.Event.addListener(YAHOO.temaativo.container.panel.close,"click",function(){i3GEOpanelEditor.deactivate();i3GEOpanelEditor.activate();if(i3GEO.eventos&&i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")>0){i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()")}});if(typeof i3GEO!=undefined&&i3GEO!=""){if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEO.editorOL.atualizaJanelaAtivaTema()")}}temp=$i("paneltemaativo_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("paneltemaativo")}}}else{YAHOO.temaativo.container.panel.show();i3GEO.editorOL.atualizaJanelaAtivaTema()}},ativaTema:function(id){document.getElementById("i3GEOOLlistaTemasAtivos").value=id},layerAtivo:function(){var id=document.getElementById("i3GEOOLlistaTemasAtivos");if(id){id=id.value}else{id=i3GEO.temaAtivo}if(id==""){return[]}else{return i3GEO.editorOL.layersLigados()[id]}},listaItens:function(layer,idonde,idobj){if(!layer){return}if(!layer.params){return}var u=layer.url+"&request=describefeaturetype&service=wfs&version=1.0.0";u+="&typename="+layer.params.LAYERS;document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.WFSDescribeFeatureType({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),prop=gml.featureTypes[0].properties,nprop=prop.length,i,combo="<select id="+idobj+" ><option value=''>----</option>";for(i=0;i<nprop;i++){combo+="<option value="+prop[i].name+" >"+prop[i].name+"</option>"}combo+="</select>";document.getElementById(idonde).innerHTML=combo},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},busca:function(layer,item,palavra,onde){document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";var u=layer.url+"&request=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layer.params.LAYERS;u+="&filter=<Filter><PropertyIsLike wildcard=* singleChar=. escape=! ><PropertyName>"+item+"</PropertyName><Literal>*"+palavra+"*</Literal></PropertyIsLike></Filter>";document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";document.getElementById(onde).innerHTML="...";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),ngml=gml.length,i,ins="<select onchange='i3GEO.editorOL.zoomPara(this.value)'>";ins+="<option value=''>---</option>";for(i=0;i<ngml;i++){eval("var valor = gml[i].data."+item);var bounds=gml[i].geometry.getBounds();bounds=bounds.toBBOX();ins+="<option value='"+bounds+"'>"+valor+"</option>"}ins+="</select>";document.getElementById(onde).innerHTML=ins},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},zoomPara:function(bbox){var b=new OpenLayers.Bounds.fromString(bbox);i3GEO.editorOL.mapa.zoomToExtent(b)},mostraLegenda:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,ins="",i;for(i=0;i<nlayers;i++){try{if(layers[i].isBaseLayer===false){var url=layers[i].getFullRequestString({"request":"getlegendgraphic"});if(i3GEO.editorOL.legendahtml===true){url=url.replace("image%2Fpng","text/html");ins+=layers[i].name+"<br><div id=legendaL_"+i+" ></div><br>";eval("var f = function(retorno){document.getElementById('legendaL_"+i+"').innerHTML = retorno.responseText;};");var config={method:"GET",url:url,callback:f};OpenLayers.Request.issue(config)}else{url=url.replace("LAYERS","LAYER");ins+=layers[i].name+"<br><img src='"+url+"' /><br>"}}}catch(e){}}if(!document.getElementById("panellegendaeditorOL")){YAHOO.namespace("legendaeditorOL.container");YAHOO.legendaeditorOL.container.panel=new YAHOO.widget.Panel("panellegendaeditorOL",{zIndex:20000,iframe:true,width:"auto",visible:false,draggable:true,close:true});YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.setHeader("Legenda");YAHOO.legendaeditorOL.container.panel.setFooter("");YAHOO.legendaeditorOL.container.panel.render(document.body);YAHOO.legendaeditorOL.container.panel.show();YAHOO.legendaeditorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close,"click",function(){})}else{YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.show()}},captura:function(lonlat){var layers=[i3GEO.editorOL.layerAtivo()],xy=lonlat.split(","),u=layers[0].url+"&REQUEST=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS;u=u.replace("&cache=sim","&DESLIGACACHE=sim");u=u.replace("&Z=${z}&X=${x}&Y=${y}","");xy[0]=xy[0]*1;xy[1]=xy[1]*1;var poligono=(xy[0]-0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1);u+="&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>";document.body.style.cursor="wait";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="wait"}OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}var i,n,f,fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText);n=gml.length;for(i=0;i<n;i++){f=gml[i];f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,registros:f["attributes"]}}i3GEO.desenho.layergrafico.addFeatures(gml)},failure:function(){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}alert("Erro")}})},salvaGeometrias:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="";if(n>0){if($i("panelsalvageometrias")){YAHOO.salvaGeometrias.container.panel=YAHOO.i3GEO.janela.manager.find("panelsalvageometrias");YAHOO.salvaGeometrias.container.panel.show();YAHOO.salvaGeometrias.container.panel.bringToTop()}else{try{YAHOO.namespace("salvaGeometrias.container");YAHOO.salvaGeometrias.container.panel=new YAHOO.widget.Panel("panelsalvageometrias",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.salvaGeometrias.container.panel.setHeader("Geometrias");YAHOO.salvaGeometrias.container.panel.setBody("");YAHOO.salvaGeometrias.container.panel.setFooter("");YAHOO.salvaGeometrias.container.panel.render(document.body);YAHOO.salvaGeometrias.container.panel.center();if(YAHOO.i3GEO.janela){YAHOO.i3GEO.janela.manager.register(YAHOO.salvaGeometrias.container.panel)}YAHOO.salvaGeometrias.container.panel.show()}catch(e){}}ins+="<p class=paragrafo >Foram encontrada(s) "+n+" geometria(s) selecionada(s) </p>";ins+="<p class=paragrafo ><a href='#' onclick='i3GEO.editorOL.listaGeometriasSel()' >Listar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='"+i3GEO.editorOL.nomeFuncaoSalvar+"' >Salvar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>";YAHOO.salvaGeometrias.container.panel.setBody(ins)}else{alert("Selecione pelo menos um elemento")}},exportarSHP:function(){i3GEO.editorOL.processageo("converteSHP")},listaGeometriasSel:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="",i,a,w,g;for(i=0;i<n;i++){g=geos[i];ins+="<b>Geometria: "+i+"</b><br>"+i3GEO.editorOL.google2wgs(g.geometry)+"<br><br>";ins+="<b>Atributos: "+i+"</b><br>";a=g.attributes;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}if(g.attributes.registros){ins+="<b>Registros: "+i+"</b><br>";a=g.attributes.registros;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}}}w=window.open();w.document.write(ins);w.document.close()},testeSalvar:function(){alert("Funcao nao disponivel. Defina o nome da funcao em i3GEO.editorOL.nomeFuncaoSalvar ")},salvaGeo:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,funcaoOK=function(){if(geos[0].geometry){var registros="",valorunico="",nometema=$i("editorOLcomboTemaEditavel").value,key="",tema,redesenha,p,g=i3GEO.editorOL.google2wgs(geos[0].geometry);if(nometema==""){return}tema=i3GEO.arvoreDeCamadas.pegaTema(nometema,"","name");if(geos[0].attributes.registros){registros=geos[0].attributes.registros;for(key in registros){if(registros[key]&&key==tema.colunaidunico){valorunico=registros[key]}}}redesenha=function(retorno){i3GEO.janela.fechaAguarde("aguardeSalvaPonto");i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);i3GEO.Interface.atualizaTema("",nometema)};i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardeSalvaPonto","Adicionando...");i3GEO.janela.AGUARDEMODAL=false;if(valorunico==""){p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&tema="+nometema+"&wkt="+g)}else{p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=atualizaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&idunico="+valorunico+"&tema="+nometema+"&wkt="+g)}}},funcaoCombo=function(obj){$i("editorOLondeComboTemaEditavel").innerHTML=obj.dados},texto="Salvar no tema:<br><div id=editorOLondeComboTemaEditavel ></div><br><br>";if(n!=1){i3GEO.janela.tempoMsg("Selecione apenas uma figura")}else{i3GEO.janela.confirma(texto,300,"Salva","Cancela",funcaoOK);i3GEO.util.comboTemas("editorOLcomboTemaEditavel",funcaoCombo,"editorOLondeComboTemaEditavel","",false,"editavel")}},criaBotoes:function(botoes){var sketchSymbolizers={"Point":{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},"Line":{strokeWidth:3,strokeOpacity:1,strokeColor:"#666666",strokeDashstyle:"dash"},"Polygon":{strokeWidth:2,strokeOpacity:1,strokeColor:"#666666",fillColor:"white",fillOpacity:0.3}},style=new OpenLayers.Style(),styleMap=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:3}},{extendDefault:false}),adiciona=false,button,controles=[];style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEOpanelEditor=new OpenLayers.Control.Panel({displayClass:"olControlEditingToolbar1 noprint",saveState:false,activateControl:function(c){this.deactivate();this.activate();try{i3GEO.editorOL.ModifyFeature.deactivate();if(i3GEO&&i3GEO.barraDeBotoes){i3GEO.barraDeBotoes.ativaPadrao()}}catch(e){}if(!c.trigger){c.activate()}else{c.trigger.call()}}});if(botoes.procura===true){button=new OpenLayers.Control.Button({displayClass:"editorOLprocura",trigger:function(){YAHOO.procura.container.panel.show()},title:"procura",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.pan===true){controles.push(new OpenLayers.Control.Navigation({title:"deslocar",displayClass:"editorOLpan",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoombox===true){controles.push(new OpenLayers.Control.ZoomBox({title:"zoombox",displayClass:"editorOLzoombox",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoomtot===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomtot",trigger:function(){if(i3GEO.editorOL.mapext&&i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}},title:"ajusta extensao",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomin===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomin",trigger:function(){i3GEO.editorOL.mapa.zoomIn()},title:"aproxima",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomout===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomout",trigger:function(){i3GEO.editorOL.mapa.zoomOut()},title:"afasta",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.legenda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlegenda",trigger:function(){i3GEO.editorOL.mostraLegenda()},title:"legenda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.distancia===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLdistancia",title:"distancia",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units,measure=event.measure;alert("Dist&acirc;ncia: "+measure.toFixed(3)+" "+units)}});controles.push(button);adiciona=true}if(botoes.area===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLarea",title:"area",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units;var measure=event.measure;alert("&Aacute;rea: "+measure.toFixed(3)+" "+units+" quadrados")}});controles.push(button);adiciona=true}if(botoes.identifica===true){botaoIdentifica=new OpenLayers.Control.WMSGetFeatureInfo({maxFeatures:1,infoFormat:'text/plain',layers:[i3GEO.editorOL.layerAtivo()],queryVisible:true,title:"identifica",type:OpenLayers.Control.TYPE_TOOL,displayClass:"editorOLidentifica",eventListeners:{getfeatureinfo:function(event){var lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),lonlattexto="<hr>",formata;if(botoes.linha===true||botoes.ponto===true||botoes.poligono===true||botoes.edita===true){lonlattexto+="<pre><span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>edita geometria</span></pre><br>"}formata=function(texto){var temp,temp1,n,i,f=[],textoN=texto.split(":");try{if(textoN.length>1){temp=textoN[2].replace(/\n\r/g,"");temp=temp.replace(/'/g,"");temp=temp.replace(/\n/g,"|");temp=temp.replace(/_/g," ");temp=temp.replace(/=/g,":");temp=temp.split("|");n=temp.length;for(i=0;i<n;i++){temp1=temp[i].replace(/^\s+/,"");temp1=temp1.replace(/\s+$/,"");if(temp1!="")f.push(temp1)}texto=f.join("<br><br>")}}catch(e){}return texto};i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("chicken",i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),null,"<div style=text-align:left >"+lonlattexto+"<pre>"+formata(event.text)+"</pre></div>",null,true));i3GEO.editorOL.removeClone()},beforegetfeatureinfo:function(event){var ativo=[i3GEO.editorOL.layerAtivo()];if(ativo[0].CLASS_NAME=="OpenLayers.Layer.TMS"||ativo[0].CLASS_NAME=="OpenLayers.Layer.OSM"){ativo=[i3GEO.editorOL.layertms2wms(ativo[0])]}ativo[0].projection=new OpenLayers.Projection("EPSG:4326");event.object.layers=ativo;botaoIdentifica.layers=ativo;botaoIdentifica.url=ativo[0].url},activate:function(){i3GEO.editorOL.criaJanelaAtivaTema()}}});controles.push(botaoIdentifica);adiciona=true}if(botoes.linha===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{displayClass:"editorOLlinha",title:"digitalizar linha",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.ponto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLponto",title:"digitalizar ponto",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f,style_mark;if(i3GEO.editorOL.simbologia.externalGraphic!=""){style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=i3GEO.editorOL.simbologia.externalGraphic;style_mark.graphicWidth=i3GEO.editorOL.simbologia.graphicWidth;style_mark.graphicHeight=i3GEO.editorOL.simbologia.graphicHeight;style_mark.fillOpacity=i3GEO.editorOL.simbologia.opacidade;f=new OpenLayers.Feature.Vector(feature,null,style_mark)}else{f=new OpenLayers.Feature.Vector(feature)}f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,externalGraphic:i3GEO.editorOL.simbologia.externalGraphic,graphicHeight:i3GEO.editorOL.simbologia.graphicHeight,graphicWidth:i3GEO.editorOL.simbologia.graphicWidth};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.poligono===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLpoligono",title:"digitalizar poligono",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.texto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLtexto",title:"incluir texto",type:OpenLayers.Control.TYPE_TOOL,persist:true,callbacks:{done:function(feature){var texto=window.prompt("Texto",""),label=new OpenLayers.Feature.Vector(feature);label["attributes"]={opacidade:0.1,fillColor:"white",strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,texto:texto,pointRadius:2,graphicName:"square",strokeColor:"black",fontColor:i3GEO.editorOL.simbologia.fontColor,fontSize:i3GEO.editorOL.simbologia.fontSize,fontFamily:"Arial",fontWeight:"bold",labelAlign:"rt"};if(texto&&texto!==""){i3GEO.desenho.layergrafico.addFeatures([label])}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.edita===true&&botoes.corta===true&&i3GEO.php){i3GEO.editorOL.CortaFeature=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLcorta",title:"corta figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length!=1){alert("Selecione primeiro um elemento para ser cortado");i3GEO.editorOL.CortaFeature.deactivate()}else{i3GEO.editorOL.CortaFeature.activate()}},callbacks:{done:function(feature){var temp,sel=i3GEO.desenho.layergrafico.selectedFeatures[0].geometry,corta=feature;temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.cortador");if(retorno!=""&&retorno.data&&retorno.data!=""){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}};i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando");i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference")}}});controles.push(i3GEO.editorOL.CortaFeature);adiciona=true}if(botoes.edita===true){i3GEO.editorOL.ModifyFeature=new OpenLayers.Control.ModifyFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLedita",title:"modifica figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,mode:OpenLayers.Control.ModifyFeature.RESHAPE,standalone:false,createVertices:true,styleMap:"default",vertexRenderIntent:"vertex"});controles.push(i3GEO.editorOL.ModifyFeature);adiciona=true}if(botoes.edita===true&&botoes.listag===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlistag",trigger:function(){i3GEO.editorOL.listaGeometrias()},title:"lista geometrias",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.frente===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfrente",trigger:function(){i3GEO.editorOL.trazParaFrente();if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},title:"traz para frente",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.tools===true&&i3GEO.php){button=new OpenLayers.Control.Button({displayClass:"editorOLtools",trigger:function(){if(i3GEO.php){i3GEO.editorOL.ferramentas()}else{i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()")}},title:"ferramentas",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.selecao===true){i3GEO.editorOL.selbutton=new OpenLayers.Control.SelectFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLselecao",title:"seleciona elemento",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,multiple:false,hover:false,toggleKey:"ctrlKey",multipleKey:"shiftKey",box:false});controles.push(i3GEO.editorOL.selbutton);adiciona=true}if(botoes.apaga===true){button=new OpenLayers.Control.Button({displayClass:"editorOLapaga",trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length>0){var x=window.confirm("Exclui os elementos selecionados?");if(x){i3GEO.editorOL.guardaBackup();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}else{alert("Selecione pelo menos um elemento")}},title:"apaga selecionados",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.propriedades===true){button=new OpenLayers.Control.Button({displayClass:"editorOLpropriedades",trigger:function(){i3GEO.editorOL.propriedades()},title:"propriedades",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.salva===true){button=new OpenLayers.Control.Button({displayClass:"editorOLsalva",trigger:function(){i3GEO.editorOL.salvaGeometrias()},title:"salva",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.ajuda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLajuda",trigger:function(){try{window.open(i3GEO.configura.locaplic+"/mashups/openlayers_ajuda.php")}catch(e){window.open("openlayers_ajuda.php")}},title:"ajuda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.fecha===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfecha",trigger:function(){var temp=window.confirm("Remove a edicao?");if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}i3GEOpanelEditor.destroy();try{YAHOO.temaativo.container.panel.destroy()}catch(e){}try{YAHOO.procura.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.listaGeometrias.panel.destroy()}catch(e){}try{YAHOO.editorOL.ferramentas.panel.destroy()}catch(e){}try{YAHOO.legendaeditorOL.container.panel.destroy()}catch(e){}try{YAHOO.salvaGeometrias.container.panel.destroy()}catch(e){}if(temp===true){try{if(i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.removeLayer(i3GEO.desenho.layergrafico);delete(i3GEO.desenho.layergrafico)}if(i3GEO.editorOL.backup){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.backup);delete(i3GEO.editorOL.backup)}}catch(e){}}},title:"fecha editor",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}i3GEOOLsnap=new OpenLayers.Control.Snapping({layer:i3GEO.desenho.layergrafico});i3GEOOLsplit=new OpenLayers.Control.Split({layer:i3GEO.desenho.layergrafico,source:i3GEO.desenho.layergrafico,tolerance:0.0001,eventListeners:{beforesplit:function(event){i3GEO.editorOL.guardaBackup()},aftersplit:function(event){i3GEO.editorOL.flashFeatures(event.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}});if(adiciona===true){i3GEOpanelEditor.addControls(controles);i3GEO.editorOL.mapa.addControl(i3GEOpanelEditor)}},mudaSimbolo:function(estilo,id){var valor=$i(id).value,geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,i;i3GEO.editorOL.simbologia[estilo]=valor;for(i=0;i<n;i++){geos[i].attributes[estilo]=valor;geos[i].style[estilo]=valor}},adicionaMarcas:function(){if(i3GEO.editorOL.pontos.length===0){return}var SHADOW_Z_INDEX=10,MARKER_Z_INDEX=11,layer=new OpenLayers.Layer.Vector("pontos",{styleMap:new OpenLayers.StyleMap({externalGraphic:i3GEO.editorOL.marca,backgroundGraphic:"../pacotes/openlayers/img/marker_shadow.png",backgroundXOffset:0,backgroundYOffset:-7,graphicZIndex:MARKER_Z_INDEX,backgroundGraphicZIndex:SHADOW_Z_INDEX,pointRadius:10}),isBaseLayer:false,rendererOptions:{yOrdering:true},displayInLayerSwitcher:true,visibility:true}),index,x=[],y=[],features=[];for(index=0;index<i3GEO.editorOL.pontos.length;index=index+2){x.push(i3GEO.editorOL.pontos[index]);y.push(i3GEO.editorOL.pontos[index+1])}for(index=0;index<x.length;index++){features.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x[index],y[index])))}layer.addFeatures(features);i3GEO.editorOL.mapa.addLayer(layer)},adicionaKml:function(){var temp,n,i,id,url;n=i3GEO.editorOL.kml.length;for(i=0;i<n;i++){id="kml"+i;url=i3GEO.editorOL.kml[i];eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3GEO.editorOL.mapa.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,g,html="";if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3GEO.editorOL.mapa.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(var j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}}},propriedades:function(){if(!document.getElementById("panelpropriedadesEditor")){YAHOO.namespace("editorOL.container");YAHOO.editorOL.container.panel=new YAHOO.widget.Panel("panelpropriedadesEditor",{zIndex:20000,iframe:true,width:"350px",height:"250px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo ><b>Estilos (utilize a cor no formato r,g,b):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td>Cor do contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeColor\',\'i3GEOEditorOLcorContorno\')" type="text" style="cursor:text" id="i3GEOEditorOLcorContorno" size="12" value="'+i3GEO.editorOL.simbologia.strokeColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorContorno\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor do preenchimento</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fillColor\',\'i3GEOEditorOLcorPre\')" type="text" style="cursor:text" id="i3GEOEditorOLcorPre" size="12" value="'+i3GEO.editorOL.simbologia.fillColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorPre\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontColor\',\'i3GEOEditorOLcorFonte\')" type="text" style="cursor:text" id="i3GEOEditorOLcorFonte" size="12" value="'+i3GEO.editorOL.simbologia.fontColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorFonte\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Tamanho da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontSize\',\'i3GEOEditorOLfontsize\')" type="text" style="cursor:text" id="i3GEOEditorOLfontsize" size="3" value="'+i3GEO.editorOL.simbologia.fontSize+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Opacidade (de 0 a 1)</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'opacidade\',\'i3GEOEditorOLopacidade\')" type="text" style="cursor:text" id="i3GEOEditorOLopacidade" size="3" value="'+i3GEO.editorOL.simbologia.opacidade+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura da linha/contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeWidth\',\'i3GEOEditorOLlarguraLinha\')" type="text" style="cursor:text" id="i3GEOEditorOLlarguraLinha" size="2" value="'+i3GEO.editorOL.simbologia.strokeWidth+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Url de uma figura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'externalGraphic\',\'i3GEOEditorOLexternalGraphic\')" type="text" style="cursor:text" id="i3GEOEditorOLexternalGraphic" size="22" value="'+i3GEO.editorOL.simbologia.externalGraphic+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura e altura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicWidth\',\'i3GEOEditorOLgraphicWidth\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicWidth" size="4" value="'+i3GEO.editorOL.simbologia.graphicWidth+'" />&nbsp;<input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicHeight\',\'i3GEOEditorOLgraphicHeight\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicHeight" size="4" value="'+i3GEO.editorOL.simbologia.graphicHeight+'" /></td><td></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Ajusta n&oacute; em edi&ccedil;&atilde;o para o(a):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td></td><td>n&oacute</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_node" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_nodeTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_vertex" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_vertexTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Divide intersec&ccedil;&atilde;o ao digitalizar</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.split()" type="checkbox" id="edge_split_toggle" /></td><td>borda</td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Opera&ccedil;&atilde;o ativada pelo bot&atilde;o de modifica&ccedil;&atilde;o da figura</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input checked style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESHAPE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera figura</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESIZE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera tamanho</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.ROTATE;" type="radio" name=i3geoOLtipoEdita /></td><td>rotaciona</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.DRAG;" type="radio" name=i3geoOLtipoEdita /></td><td>desloca</td>'+' </tr>'+'</table>';YAHOO.editorOL.container.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.container.panel.setHeader("Propriedades<div id='panelpropriedadesEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.container.panel.setHeader("Propriedades")}YAHOO.editorOL.container.panel.setFooter("");YAHOO.editorOL.container.panel.render(document.body);YAHOO.editorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close,"click",function(){});temp=$i("panelpropriedadesEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelpropriedadesEditor")}}}YAHOO.editorOL.container.panel.show();temp=$i("panelpropriedadesEditor").getElementsByTagName("div");if(temp&&temp[2]){temp[2].style.overflow="auto"}},listaGeometrias:function(){if(!document.getElementById("panellistagEditor")){YAHOO.namespace("editorOL.listaGeometrias");YAHOO.editorOL.listaGeometrias.panel=new YAHOO.widget.Panel("panellistagEditor",{zIndex:20000,iframe:true,width:"320px",visible:false,draggable:true,close:true});if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias <div id='panellistagEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias")}YAHOO.editorOL.listaGeometrias.panel.setFooter("");YAHOO.editorOL.listaGeometrias.panel.render(document.body);YAHOO.editorOL.listaGeometrias.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.listaGeometrias.panel.close,"click",function(){YAHOO.editorOL.listaGeometrias.panel.destroy()});temp=$i("panellistagEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panellistagEditor")}}}else{YAHOO.editorOL.listaGeometrias.panel.render(document.body)}var g,temp,geos=i3GEO.desenho.layergrafico.features,n=geos.length,ins="<table class=lista4 >";ins+="<tr><td><i>Geometrias</i></td><td><i>Op&ccedil;&otilde;es</i></td><td></td><td></td></tr>";while(n>0){n-=1;g=geos[n].geometry;ins+="<tr><td>"+g.CLASS_NAME+"</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.selFeature("+n+")'>seleciona</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.unselFeature("+n+")'>limpa</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.flashFeaturesI("+n+")'>brilha</td></tr>"}ins+="</table>";if(geos.length===0){ins="Nenhum elemento gr&aacute;fico encontrado. Utilize as op&ccedil;&otilde;es de cria&ccedil;&atilde;o de geometrias."}YAHOO.editorOL.listaGeometrias.panel.show();if(i3GEO.configura){temp=$i("panellistagEditor").getElementsByTagName("div")[2]}else{temp=$i("panellistagEditor").getElementsByTagName("div")[1]}temp.style.overflow="auto";temp.style.height="100px";temp.innerHTML=ins},ferramentas:function(){if(!document.getElementById("panelferramentasEditor")){YAHOO.namespace("editorOL.ferramentas");YAHOO.editorOL.ferramentas.panel=new YAHOO.widget.Panel("panelferramentasEditor",{zIndex:20000,iframe:true,width:"300px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo >Opera&ccedil;&otilde;es sobre as figuras selecionadas:</p>'+'<select onchange="i3GEO.editorOL.processageo(this.value);this.value = \'\'" >'+' <option value="">---</option>'+' <option value=union >Uni&atilde;o</option>';if(i3GEO.php){ins+=' <option value=intersection >Intersec&ccedil;&atilde;o</option>'+' <option value=convexhull >Convex hull</option>'+' <option value=boundary >Bordas</option>'+' <option value=difference >Diferen&ccedil;a</option>'+' <option value=symdifference >Diferen&ccedil;a sim&eacute;trica</option>'}ins+='</select>'+'<br><br><a class=paragrafo href=# onclick="i3GEO.desenho.layergrafico.destroyFeatures()" >Apaga tudo</a>';YAHOO.editorOL.ferramentas.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas <div id='panelferramentasEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas")}YAHOO.editorOL.ferramentas.panel.setFooter("");YAHOO.editorOL.ferramentas.panel.render(document.body);YAHOO.editorOL.ferramentas.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.ferramentas.panel.close,"click",function(){});temp=$i("panelferramentasEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelferramentasEditor")}}}else{YAHOO.editorOL.ferramentas.panel.render(document.body)}YAHOO.editorOL.ferramentas.panel.show()},snap:function(){var target=i3GEOOLsnap.targets[0],tipos=["node","vertex","edge"],ntipos=tipos.length,i,temp,ativa=false;i3GEOOLsnap.deactivate();for(i=0;i<ntipos;i++){temp=$i("target_"+tipos[i]);target[tipos[i]]=temp.checked;if(temp.checked===true){ativa=true}temp=$i("target_"+tipos[i]+"Tolerance");target[tipos[i]+"Tolerance"]=temp.value}if(ativa===true){i3GEOOLsnap.activate()}},split:function(){i3GEOOLsplit.deactivate();var temp=$i("edge_split_toggle");if(temp.checked===true){i3GEOOLsplit.activate()}},processageo:function(operacao){if(operacao===""){return}var geosel=i3GEO.desenho.layergrafico.selectedFeatures,polis,linhas,pontos,temp;if(geosel.length>0){polis=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Polygon");linhas=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.LineString");pontos=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Point");temp=function(retorno){if(i3GEO.janela){i3GEO.janela.fechaAguarde("i3GEO.editorPoli");i3GEO.janela.fechaAguarde("i3GEO.editorLinhas");i3GEO.janela.fechaAguarde("i3GEO.editorPontos")}if(retorno!=""&&retorno.data&&retorno.data!=""&&operacao!="converteSHP"){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}if(operacao==="converteSHP"){i3GEO.atualiza();i3GEO.janela.minimiza("paneltemaativo")}};if(operacao==="union"&&!i3GEO.php){if(polis.length>0){temp=i3GEO.editorOL.uniaojts(polis);i3GEO.editorOL.substituiFeaturesSel(temp)}if(linhas.length>0){temp=i3GEO.editorOL.uniaojts(linhas);i3GEO.editorOL.substituiFeaturesSel(temp)}if(pontos.length>0){temp=i3GEO.editorOL.uniaojts(p);i3GEO.editorOL.substituiFeaturesSel(temp)}}else{if(polis.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos");i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao)}if(linhas.length>0){i3GEO.janela.abreAguarde("i3GEO.editorLinhas","Linhas");i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao)}if(pontos.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPontos","Pontos");i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao)}}return}else{alert("Selecione pelo menos dois elementos")}},uniaojts:function(geoms){var n=geoms.length,rwkt=new jsts.io.WKTReader(),wwkt=new jsts.io.WKTWriter(),fwkt=new OpenLayers.Format.WKT(),g,i,uniao;if(n>1){uniao=(fwkt.read(geoms[0]).geometry).toString();uniao=rwkt.read(uniao);for(i=1;i<=n;i++){g=(fwkt.read(geoms[i]).geometry).toString();uniao=uniao.union(rwkt.read(g))}uniao=wwkt.write(uniao);return[fwkt.read(uniao)]}else{return false}},retornaGeometriasTipo:function(features,tipo){var n=features.length,lista=[],i,temp;for(i=0;i<n;i++){temp=features[i].geometry;if(temp.CLASS_NAME==tipo){lista.push(temp)}}return lista},guardaBackup:function(){return;if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}else{i3GEO.editorOL.backup.removeFeatures(i3GEO.editorOL.backup.features)}i3GEO.editorOL.backup.addFeatures(i3GEO.desenho.layergrafico.features)},unselTodos:function(){var n,i;n=i3GEO.desenho.layergrafico.features.length;for(i=0;i<n;i++){i3GEO.desenho.layergrafico.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[i])}},unselTodosBackup:function(){var n,i;n=i3GEO.editorOL.backup.features.length;for(i=0;i<n;i++){i3GEO.editorOL.backup.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.backup.features[i])}},restauraBackup:function(){if(i3GEO.editorOL.backup.features.length>0){i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features)}if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},substituiFeaturesSel:function(wkt){i3GEO.editorOL.guardaBackup();try{var f,fwkt=new OpenLayers.Format.WKT();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);f=fwkt.read(wkt);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}catch(e){i3GEO.editorOL.restauraBackup()}},adicionaFeatureWkt:function(wkt,atributos){var f,fwkt=new OpenLayers.Format.WKT();if(atributos.externalGraphic&&atributos.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=atributos.externalGraphic;style_mark.graphicWidth=atributos.graphicWidth;style_mark.graphicHeight=atributos.graphicHeight;style_mark.fillOpacity=atributos.opacidade;f=fwkt.read(wkt);f["attributes"]=atributos;f["style"]=style_mark}else{f=fwkt.read(wkt);f["attributes"]=atributos}i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},flashFeaturesI:function(index){i3GEO.editorOL.flashFeatures([i3GEO.desenho.layergrafico.features[index]],0)},flashFeatures:function(features,index){if(!index){index=0}var current=features[index];if(current&&current.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(features[index],"select")}var prev=features[index-1];if(prev&&prev.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(prev,"default")}++index;if(index<=features.length){window.setTimeout(function(){i3GEO.editorOL.flashFeatures(features,index)},75)}},selFeature:function(index){i3GEO.editorOL.selbutton.select(i3GEO.desenho.layergrafico.features[index])},unselFeature:function(index){i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[index])},carregajts:function(funcao){if(i3GEO.configura){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}else{i3GEO.util.scriptTag("../pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}},trazParaFrente:function(){var features=i3GEO.desenho.layergrafico.selectedFeatures;if(features.length>0){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false});i3GEO.editorOL.backup.addFeatures(features);i3GEO.editorOL.unselTodosBackup();i3GEO.desenho.layergrafico.removeFeatures(features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}else{alert("Selecione pelo menos um elemento")}},pegaControle:function(classe){var n=i3GEO.editorOL.controles.length,i;for(i=0;i<n;i++){if(i3GEO.editorOL.controles[i].CLASS_NAME===classe){return i3GEO.editorOL.controles[i]}}return false},ativaLayerSwitcher:function(){var ls=i3GEO.editorOL.pegaControle("OpenLayers.Control.LayerSwitcher");if(ls){ls.maximizeDiv.click()}},desativaRodaDoMouse:function(){var controls=i3GEO.editorOL.mapa.getControlsByClass('OpenLayers.Control.Navigation');for(var i=0;i<controls.length;++i){controls[i].disableZoomWheel()}},google2wgs:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84=new OpenLayers.Projection("EPSG:4326"),proj900913=new OpenLayers.Projection("EPSG:900913");return obj.transform(proj900913,projWGS84)}else{return obj}}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/classe_mapa_compacto.js
1   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={TEMASINICIAISLIGADOS:"",TEMASINICIAIS:"",AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(evt){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(evt){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.preventDefault)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){i3GEO.janela.tempoMsg("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{i3GEO.janela.tempoMsg("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:false,ID:"",CAMADASSEMLEGENDA:[],cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg=$i("wlegenda_corpo"),temp=function(retorno){var legenda="",ins,re;re=new RegExp("<img src='' />","g");if(retorno.data!=="erro"&&retorno.data!==undefined){legenda="<div onclick='i3GEO.mapa.legendaHTML.mostraTodosOsTemas()' style=cursor:pointer;font-size:10px;text-align:left; >Mostra tudo</div><br>"+retorno.data.legenda}if(legenda!=""&&idleg){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -35px; top: -22px;">'+$trad("x11")+'</p></div>'}legenda=legenda.replace(re,"");ins+="<div id='corpoLegi' >"+legenda+"</div>";idleg.innerHTML=legenda}i3GEO.mapa.legendaHTML.escondeTemasMarcados()};if(idleg&&idleg.style.display==="block"){if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg){idleg.innerHTML=""}}idleg=$i("wlegenda_corpo");i3GEO.mapa.legendaHTML.obtem(temp)}else{if(idleg){idleg.innerHTML=""}if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},escondeTema:function(tema){var d=$i("legendaLayer_"+tema);if(d){d.style.display="none";i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA.push(tema)}},escondeTemasMarcados:function(){var temas=i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA,n=temas.length,i,temp;for(i=0;i<n;i++){temp=$i(temas[i]);if(temp){temp.style.display="none"}}},mostraTodosOsTemas:function(){i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA=[];i3GEO.mapa.legendaHTML.atualiza()},libera:function(ck,largura,altura,topo,esquerda){if(!ck){ck="nao"}if(!largura){largura=302}if(!altura){altura=300}var cabecalho,minimiza,janela;if(!$i("wlegenda")){cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("wlegenda")};janela=i3GEO.janela.cria(largura+"px",altura+"px","","","",$trad("p3"),"wlegenda",false,"hd",cabecalho,minimiza)}else{janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.show()}$i("wlegenda_corpo").style.backgroundColor="white";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza();if(topo&&esquerda){janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.moveTo(esquerda,topo)}}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{geolocal:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.geolocal()","geolocal","geolocal")},listaDeMapasBanco:function(){if(i3GEO.guias.CONFIGURA["mapas"]){var janela,divid;janela=i3GEO.janela.cria("200px","450px","","","","","i3GEOFsalvaMapaLista",false,"hd");divid=janela[2].id;i3GEO.guias.CONFIGURA["mapas"].click.call(this,divid)}else{window.open(i3GEO.configura.locaplic+"/admin/rssmapas.php","_blank")}},congelaMapa:function(){var url="",idjanela=YAHOO.util.Dom.generateId(),cabecalho=function(){},minimiza=function(){i3GEO.janela.minimiza(idjanela)};if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){url=i3GEO.configura.locaplic+"/ferramentas/congelamapa/openlayers.php?g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);i3GEO.janela.cria("500px","350px",url,"","",$trad("x64"),idjanela,false,"hd",cabecalho,minimiza)}},metaestat:function(){var temp=function(){i3GEOF.metaestat.MULTIPARAMETROS=true;i3GEOF.metaestat.inicia()};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js",temp)},metaestatListaMapas:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()")},preferencias:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias")},locregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.locregiao()","metaestat","locregiao","locregiao.js")},filtraregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraregiao()","metaestat","locregiao","locregiao.js","i3GEOF.locregiao.abreComFiltro()")},animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(x,y){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identifica"&&i3GEO.eventos.cliquePerm.ativo===false){return}i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js",temp=function(){if(x){i3GEOF.identifica.criaJanelaFlutuante(x,y)}else{i3GEOF.identifica.criaJanelaFlutuante()}};i3GEO.util.scriptTag(js,temp,"i3GEOF.identifica_script")}else{if(x){i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,x,y)}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo)}return}},verificaTipDefault:function(e){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identificaBalao"&&i3GEO.eventos.cliquePerm.ativo===false){return}if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}var ntemas,etiquetas,j,retorna,targ="";if(!e){e=window.event}try{if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){targ=null}ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var classeCor,pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span class='toolTipBalaoTitulo'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;classeCor="toolTipBalaoTexto";for(s=0;s<nds;s+=1){ins+="<div class='"+classeCor+"'>";for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}mostra=true}else{ins+="<span>"+valor+"</span><br>";mostra=true}}catch(e){}}if(classeCor==="toolTipBalaoTexto"){classeCor="toolTipBalaoTexto1"}else{classeCor="toolTipBalaoTexto"}ins+="</div>"}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};xy=i3GEO.navega.centroDoMapa();i3GEO.php.identifica3(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}},compactaLayerGrafico:function(){var geos=false,geometrias=[],g=[],n=0,i;if(i3GEO.editorOL&&i3GEO.desenho.layergrafico&&i3GEO.desenho.layergrafico.features){geos=i3GEO.desenho.layergrafico.features;n=geos.length;for(i=0;i<n;i++){g={"atributos":geos[i].attributes,"geometria":geos[i].geometry.toString()};geometrias.push(g)}}g=YAHOO.lang.JSON.stringify(geometrias);return i3GEO.util.base64encode(g)},desCompactaLayerGrafico:function(geometrias){geometrias=YAHOO.lang.JSON.parse(geometrias);if(geometrias.length>0){var inicia=function(){i3GEO.barraDeBotoes.editor.ativaPainel();var n=geometrias.length,i;for(i=0;i<n;i++){i3GEO.editorOL.adicionaFeatureWkt(geometrias[i].geometria,geometrias[i].atributos)}$i(i3GEO.editorOL.layergrafico.id).style.zIndex=5000};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js",inicia,"openlayers.js",true)}},aplicaPreferencias:function(cookies){var props,nprops,i,temp=[],pint;if(!cookies){cookies=i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo")}if(cookies){props=cookies.split("::");nprops=props.length;for(i=0;i<nprops;i++){try{temp=props[i].split("|");pint=parseInt(temp[1],10);if(temp[1]==='true'||temp[1]==='false'){if(temp[1]==='true'){temp[1]=true}if(temp[1]==='false'){temp[1]=false}eval(temp[0]+" = "+temp[1]+";")}else if(pint+"px"==temp[1]){eval(temp[0]+" = '"+temp[1]+"';")}else if(YAHOO.lang.isNumber(pint)){eval(temp[0]+" = "+temp[1]+";")}else{eval(temp[0]+" = '"+temp[1]+"';")}if(temp[0]=="i3GEO.configura.mapaRefDisplay"){i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay",temp[1])}}catch(e){}}}}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={TEMASINICIAISLIGADOS:"",TEMASINICIAIS:"",AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(evt){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(evt){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.preventDefault)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){i3GEO.janela.tempoMsg("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{i3GEO.janela.tempoMsg("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:false,ID:"",CAMADASSEMLEGENDA:[],cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg=$i("wlegenda_corpo"),temp=function(retorno){var legenda="",ins,re;re=new RegExp("<img src='' />","g");if(retorno.data!=="erro"&&retorno.data!==undefined){legenda="<div onclick='i3GEO.mapa.legendaHTML.mostraTodosOsTemas()' style=cursor:pointer;font-size:10px;text-align:left; >Mostra tudo</div><br>"+retorno.data.legenda}if(legenda!=""&&idleg){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -35px; top: -22px;">'+$trad("x11")+'</p></div>'}legenda=legenda.replace(re,"");ins+="<div id='corpoLegi' >"+legenda+"</div>";idleg.innerHTML=legenda}i3GEO.mapa.legendaHTML.escondeTemasMarcados()};if(idleg&&idleg.style.display==="block"){if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg){idleg.innerHTML=""}}idleg=$i("wlegenda_corpo");i3GEO.mapa.legendaHTML.obtem(temp)}else{if(idleg){idleg.innerHTML=""}if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},escondeTema:function(tema){var d=$i("legendaLayer_"+tema);if(d){d.style.display="none";i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA.push(tema)}},escondeTemasMarcados:function(){var temas=i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA,n=temas.length,i,temp;for(i=0;i<n;i++){temp=$i(temas[i]);if(temp){temp.style.display="none"}}},mostraTodosOsTemas:function(){i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA=[];i3GEO.mapa.legendaHTML.atualiza()},libera:function(ck,largura,altura,topo,esquerda){if(!ck){ck="nao"}if(!largura){largura=302}if(!altura){altura=300}var cabecalho,minimiza,janela;if(!$i("wlegenda")){cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("wlegenda")};janela=i3GEO.janela.cria(largura+"px",altura+"px","","","",$trad("p3"),"wlegenda",false,"hd",cabecalho,minimiza)}else{janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.show()}$i("wlegenda_corpo").style.backgroundColor="white";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza();if(topo&&esquerda){janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.moveTo(esquerda,topo)}}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{geolocal:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.geolocal()","geolocal","geolocal")},listaDeMapasBanco:function(){if(i3GEO.guias.CONFIGURA["mapas"]){var janela,divid;janela=i3GEO.janela.cria("200px","450px","","","","","i3GEOFsalvaMapaLista",false,"hd");divid=janela[2].id;i3GEO.guias.CONFIGURA["mapas"].click.call(this,divid)}else{window.open(i3GEO.configura.locaplic+"/admin/rssmapas.php","_blank")}},congelaMapa:function(){var url="",idjanela=YAHOO.util.Dom.generateId(),cabecalho=function(){},minimiza=function(){i3GEO.janela.minimiza(idjanela)};if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){url=i3GEO.configura.locaplic+"/ferramentas/congelamapa/openlayers.php?g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);i3GEO.janela.cria("500px","350px",url,"","",$trad("x64"),idjanela,false,"hd",cabecalho,minimiza)}},metaestat:function(){var temp=function(){i3GEOF.metaestat.MULTIPARAMETROS=true;i3GEOF.metaestat.inicia()};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js",temp)},metaestatListaMapas:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()")},preferencias:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias")},locregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.locregiao()","metaestat","locregiao","locregiao.js")},filtraregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraregiao()","metaestat","locregiao","locregiao.js","i3GEOF.locregiao.abreComFiltro()")},animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(x,y){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identifica"&&i3GEO.eventos.cliquePerm.ativo===false){return}i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js",temp=function(){if(x){i3GEOF.identifica.criaJanelaFlutuante(x,y)}else{i3GEOF.identifica.criaJanelaFlutuante()}};i3GEO.util.scriptTag(js,temp,"i3GEOF.identifica_script")}else{if(x){i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,x,y)}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo)}return}},verificaTipDefault:function(e){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identificaBalao"&&i3GEO.eventos.cliquePerm.ativo===false){return}if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}var ntemas,etiquetas,j,retorna,targ="";if(!e){e=window.event}try{if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){targ=null}ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var classeCor,pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span class='toolTipBalaoTitulo'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;classeCor="toolTipBalaoTexto";for(s=0;s<nds;s+=1){ins+="<div class='"+classeCor+"'>";for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}mostra=true}else{ins+="<span>"+valor+"</span><br>";mostra=true}}catch(e){}}if(classeCor==="toolTipBalaoTexto"){classeCor="toolTipBalaoTexto1"}else{classeCor="toolTipBalaoTexto"}ins+="</div>"}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};xy=i3GEO.navega.centroDoMapa();i3GEO.php.identifica3(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}},compactaLayerGrafico:function(){var geos=false,geometrias=[],n=0,i,g;if(i3GEO.editorOL&&i3GEO.desenho.layergrafico&&i3GEO.desenho.layergrafico.features){geos=i3GEO.desenho.layergrafico.features;n=geos.length;for(i=0;i<n;i++){g={"atributos":geos[i].attributes,"geometria":geos[i].geometry.toString()};geometrias.push(g)}}g=YAHOO.lang.JSON.stringify(geometrias);return i3GEO.util.base64encode(g)},desCompactaLayerGrafico:function(geometrias){geometrias=YAHOO.lang.JSON.parse(geometrias);if(geometrias.length>0){var inicia=function(){i3GEO.barraDeBotoes.editor.ativaPainel();var n=geometrias.length,i;for(i=0;i<n;i++){i3GEO.editorOL.adicionaFeatureWkt(geometrias[i].geometria,geometrias[i].atributos)}$i(i3GEO.editorOL.layergrafico.id).style.zIndex=5000};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js",inicia,"openlayers.js",true)}},aplicaPreferencias:function(cookies){var props,nprops,i,temp=[],pint;if(!cookies){cookies=i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo")}if(cookies){props=cookies.split("::");nprops=props.length;for(i=0;i<nprops;i++){try{temp=props[i].split("|");pint=parseInt(temp[1],10);if(temp[1]==='true'||temp[1]==='false'){if(temp[1]==='true'){temp[1]=true}if(temp[1]==='false'){temp[1]=false}eval(temp[0]+" = "+temp[1]+";")}else if(pint+"px"==temp[1]){eval(temp[0]+" = '"+temp[1]+"';")}else if(YAHOO.lang.isNumber(pint)){eval(temp[0]+" = "+temp[1]+";")}else{eval(temp[0]+" = '"+temp[1]+"';")}if(temp[0]=="i3GEO.configura.mapaRefDisplay"){i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay",temp[1])}}catch(e){}}}}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/dicionario_compacto.js
1   -g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:""}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"N&atilde;o imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opci&oacute;n de impresi&oacute;n del mapa",it:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Anima&ccedil;&atilde;o",en:"Animation",es:"Animaci&oacute;n",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Propriet"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usu&aacute;rio",en:"User manual",es:"Manual de usuario",it:"Manual do usu&aacute;rio"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico Brazil",es:"Software p&uacute;blico Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de pol&iacute;gonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grat&iacute;la de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grat&iacute;la de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Points distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Pol&iacute;gonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro m&eacute;dio",en:"Middle center",es:"Centro medio",it:"Centro m&eacute;dio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aqu&iacute; &oacute; haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:""}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:""}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non conosciuta"}],"t12":[{pt:"Excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transpar&ecirc;ncia do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a altera&ccedil;&atilde;o da forma de representa&ccedil;&atilde;o desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gr&aacute;fico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t37a":[{pt:"Tema com gr&aacute;ficos",en:"Theme with chart",es:"Tema con Gr&aacute;fico",it:"Grafico"}],"t37b":[{pt:"Gr&aacute;fico interativo",en:"Interactive chart",es:"Gr&aacute;fico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padr&atilde;o SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para est&aacute;ndar SLD.",it:"Exporta a legenda para o padr&atilde;o SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa ser&aacute; actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa tem&aacute;tico 3D",en:"Thematic map 3D",es:"Mapa tem&aacute;tico 3D",it:"Mapa tem&aacute;tico 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"Code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conex&otilde;es",en:"Conections",es:"Conexiones",it:"Conex&otilde;es"}],"a16":[{pt:"Servi&ccedil;os",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Cat&aacute;logo",en:"Catalog",es:"Cat&aacute;logo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida",en:"Quick search",es:"B&uacute;squeda r&aacute;pida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"Dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a a la regi&oacute;n indicada con un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la regi&oacute;n visible en el mapa. Despu&eacute;s de activada, haga clic y arrastre el rat&oacute;n sobre el mapa para mover la regi&oacute;n visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"Clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarse, detenga el rat&oacute;n por un momento en el punto deseado o haga click en &eacute;l.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensi&oacute;n geogr&aacute;fica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"Extens&atilde;o atual",en:"Actual extent",es:"Extensi&oacute; actual",it:"extens&atilde;o atual"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"mapa de refer&ecirc;ncia"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikip&eacute;dia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikip&eacute;dia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"conflu&ecirc;ncias",en:"Confluences",es:"Confluencias",it:"conflu&ecirc;ncias"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura la distanza tra due o pi punti cliccati sulla mappa (minore distanza). Il calcolo della distanza approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"dist&acirc;ncia",en:"distance",es:"distancia",it:"distncia"}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el &aacute;rea de un pol&iacute;gono dibujado sobre la pantalla. El c&aacute;lculo del &aacute;rea es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"&aacute;rea",en:"area",es:"&aacute;rea",it:"&aacute;rea"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema seleccionado. El tema debe tener campos con valores num&eacute;ricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como &aacute;reas de influencia o selecci&oacute;n por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os bot&otilde;es e outras caracter&iacute;sticas visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Esta&ccedil;&otilde;es METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Esta&ccedil;&otilde;es metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"L&iacute;nea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"N&atilde;o existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"N&atilde;o existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navega&ccedil;&atilde;o com o mouse",en:"Mouse navigation",es:"Navegaci&oacute;n con el rat&oacute;n",it:"Navega&ccedil;&atilde;o com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"Mapa de refer&ecirc;ncia"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atm&oacute;sfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites pol&iacute;ticos",en:"Political boundaries",es:"L&iacute;mites pol&iacute;ticos",it:"Limites pol&iacute;ticos"}],"ge9":[{pt:"Constru&ccedil;&otilde;es em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Constru&ccedil;&otilde;es em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"P&aacute;gina principal",en:"Home",es:"Inicio",it:"P&aacute;gina principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de men&uacute;s",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores",en:"option visible only for editors",es:"opci&oacute;n visible solo para editores",it:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores"}],"x8":[{pt:"Sistema de administra&ccedil;&atilde;o",en:"Admin. System",es:"Sistema de administraci&oacute;n",it:"Sistema de administra&ccedil;&atilde;o"}],"x9":[{pt:"Editar &aacute;rvore",en:"Edit tree",es:"Editar &aacute;rbol",it:"Editar &aacute;rvore"}],"x10":[{pt:"Editar menus do cat&aacute;logo",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas n&atilde;o encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas n&atilde;o encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"n&atilde;o",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor n&atilde;o definido",en:"Value not set",es:"Valor no establecido",it:"Valor n&atilde;o definido"}],"x17":[{pt:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa",en:"This option only affects the printing of the map",es:"Esta opci&oacute;n s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa"}],"x18":[{pt:"Nome n&atilde;o definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Coment&aacute;rios de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o pol&iacute;gono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el pol&iacute;gono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa opera&ccedil;&atilde;o n&atilde;o funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operaci&oacute;n no funciona en esta interfaz",it:""}],"x22":[{pt:"Op&ccedil;&atilde;o n&atilde;o dispon&iacute;vel",en:"Option not available",es:"Opci&oacute;n no disponible",it:"Opcin no disponible"}],"x23":[{pt:"Dire&ccedil;&atilde;o",en:"",es:"Direcci&oacute;n",it:"Direction"}],"x25":[{pt:"M&eacute;todo para calcular dist&acirc;ncias",en:"Method to calculate distances",es:"M&eacute;todo para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"Realmente desea salir?",it:""}],"x27":[{pt:"Usu&aacute;rio",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contrase&ntilde;a",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Recuperar senha",en:"Send password",es:"Enviar la contrasena",it:""}],"x33":[{pt:"Escolha um tema da lista",en:"",es:"",it:""}],"x34":[{pt:"Lugar",en:"",es:"",it:""}],"x35":[{pt:"Escolha um tipo de busca nas propriedades",en:"",es:"",it:""}],"x36":[{pt:"Digite uma palavra para busca!",en:"",es:"",it:""}],"x37":[{pt:"Onde ser&aacute; feita a busca",en:"",es:"",it:""}],"x38":[{pt:"Servi&ccedil;os de busca externos",en:"",es:"",it:""}],"x39":[{pt:"Temas existentes no mapa",en:"",es:"",it:""}],"x40":[{pt:"Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber opera&ccedil;&otilde;es de busca",en:"",es:"",it:""}],"x41":[{pt:"Nada encontrado nos temas ou nenhum tema permite busca",en:"",es:"",it:""}],"x42":[{pt:"Nada encontrado em ",en:"",es:"",it:""}],"x43":[{pt:"Erro ao acessar o servi&ccedil;o",en:"",es:"",it:""}],"x44":[{pt:"Nuvem Flash",en:"",es:"",it:""}],"x45":[{pt:"Diret&oacute;rios",en:"",es:"",it:""}],"x46":[{pt:"Conex&atilde;o WMS-T",en:"",es:"",it:""}],"x47":[{pt:"Conex&atilde;o GeoRSS",en:"",es:"",it:""}],"x48":[{pt:"Rota",en:"",es:"",it:""}],"x49":[{pt:"Coordenadas aproximadas",en:"",es:"",it:""}],"x50":[{pt:"Feche para parar",en:"",es:"",it:""}],"x51":[{pt:"Sele&ccedil;&atilde;o",en:"",es:"",it:""}],"x52":[{pt:"Alterar senha",en:"",es:"",it:""}],"x53":[{pt:"Upload de WMC",en:"",es:"",it:""}],"x54":[{pt:"Perfil",en:"",es:"",it:""}],"x55":[{pt:"Salva o tema",en:"",es:"",it:""}],"x56":[{pt:"Topon&iacute;mia",en:"",es:"",it:""}],"x57":[{pt:"Cartogramas estat&iacute;sticos",en:"",es:"",it:""}],"x58":[{pt:"Continua",en:"",es:"",it:""}],"x59":[{pt:"Localiza limite",en:"",es:"",it:""}],"x60":[{pt:"Cartogramas",en:"",es:"",it:""}],"x61":[{pt:"Filtra limite",en:"",es:"",it:""}],"x62":[{pt:"Remover",en:"",es:"",it:""}],"x63":[{pt:"Para salvar as configura&ccedil;&otilde;es de uma camada,<br> utilize a op&ccedil;&atilde;o existente na &aacute;rvore de camadas no n&oacute; correspondente ao tema (basta expandir o tema para visualizar as op&ccedil;&otilde;es)<br><br>",en:"",es:"",it:""}],"x64a":[{pt:"Congela a vis&atilde;o atual",en:"",es:"",it:""}],"x64":[{pt:"Item",en:"",es:"",it:""}],"x65":[{pt:"Buscando itens...",en:"",es:"",it:""}],"x66":[{pt:"Ocorreu um erro",en:"",es:"",it:""}],"x67":[{pt:"Comunidade i3Geo",en:"",es:"",it:""}],"x68":[{pt:"Vers&atilde;o",en:"",es:"",it:""}],"x69":[{pt:"Pressione a tecla CTRL junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"",es:"",it:""}],"x70":[{pt:"Utilize os dedos em um movimento de pin&ccedil;a para definir a &aacute;rea que ser&aacute; aproximada ou afastada",en:"",es:"",it:""}],"x71":[{pt:"Aplicativos estat&iacute;sticos cadastrados",en:"",es:"",it:""}],"x72":[{pt:"Lista de mapas cadastrados",en:"",es:"",it:""}],"x73":[{pt:"Direciona para a versao adaptada para dispositivos moveis?",en:"",es:"",it:""}],"x74":[{pt:"Fecha",en:"Close",es:"",it:""}],"x75":[{pt:"Cancela",en:"Cancel",es:"",it:""}],"x76":[{pt:"O tema j&aacute;existe no mapa. Adiciona novamente?",en:"",es:"",it:""}],"x77":[{pt:"Nome do novo marcador",en:"",es:"",it:""}],"x78":[{pt:"Copie os marcadores e cole em um editor para guard&aacute;-los",en:"",es:"",it:""}],"x79":[{pt:"Marcadores",en:"Bookmarks",es:"Marcadores",it:""}],"x80":[{pt:"Exportar",en:"Export",es:"Exportar",it:""}],"x81":[{pt:"Importar",en:"Import",es:"Importar",it:""}],"x82":[{pt:"Marcar regi&atilde;o",en:"",es:"",it:""}],"x83":[{pt:"Cole os marcadores para import&aacute;-los",en:"",es:"",it:""}],"x84":[{pt:"Exportar SHP",en:"",es:"",it:""}],"x85":[{pt:"Visualizador de WMS da INDE-Br",en:"",es:"",it:""}],"x86":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x87":[{pt:"Limites e localidades",en:"",es:"",it:""}],"x88":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x89":[{pt:"Editar cadastro",en:"",es:"",it:""}],"x90":[{pt:"Mapas cadastrados",en:"",es:"",it:""}],"x91":[{pt:"Feche para parar. Desligue o tema para ver o efeito",en:"",es:"",it:""}],"x92":[{pt:"Escolha uma camada",en:"",es:"",it:""}],"x93":[{pt:"Localiza&ccedil;&atilde;o do usu&aacute;rio",en:"",es:"",it:""}]};
2 1 \ No newline at end of file
  2 +g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:""}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"N&atilde;o imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opci&oacute;n de impresi&oacute;n del mapa",it:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Anima&ccedil;&atilde;o",en:"Animation",es:"Animaci&oacute;n",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Propriet"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usu&aacute;rio",en:"User manual",es:"Manual de usuario",it:"Manual do usu&aacute;rio"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico Brazil",es:"Software p&uacute;blico Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de pol&iacute;gonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grat&iacute;la de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grat&iacute;la de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Points distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Pol&iacute;gonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro m&eacute;dio",en:"Middle center",es:"Centro medio",it:"Centro m&eacute;dio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aqu&iacute; &oacute; haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:""}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:""}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non conosciuta"}],"t12":[{pt:"Excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transpar&ecirc;ncia do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a altera&ccedil;&atilde;o da forma de representa&ccedil;&atilde;o desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gr&aacute;fico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t37a":[{pt:"Tema com gr&aacute;ficos",en:"Theme with chart",es:"Tema con Gr&aacute;fico",it:"Grafico"}],"t37b":[{pt:"Gr&aacute;fico interativo",en:"Interactive chart",es:"Gr&aacute;fico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padr&atilde;o SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para est&aacute;ndar SLD.",it:"Exporta a legenda para o padr&atilde;o SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa ser&aacute; actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa tem&aacute;tico 3D",en:"Thematic map 3D",es:"Mapa tem&aacute;tico 3D",it:"Mapa tem&aacute;tico 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"Code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conex&otilde;es",en:"Conections",es:"Conexiones",it:"Conex&otilde;es"}],"a16":[{pt:"Servi&ccedil;os",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Cat&aacute;logo",en:"Catalog",es:"Cat&aacute;logo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida",en:"Quick search",es:"B&uacute;squeda r&aacute;pida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"Dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a a la regi&oacute;n indicada con un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la regi&oacute;n visible en el mapa. Despu&eacute;s de activada, haga clic y arrastre el rat&oacute;n sobre el mapa para mover la regi&oacute;n visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"Clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarse, detenga el rat&oacute;n por un momento en el punto deseado o haga click en &eacute;l.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensi&oacute;n geogr&aacute;fica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"Extens&atilde;o atual",en:"Actual extent",es:"Extensi&oacute; actual",it:"extens&atilde;o atual"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"mapa de refer&ecirc;ncia"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikip&eacute;dia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikip&eacute;dia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"conflu&ecirc;ncias",en:"Confluences",es:"Confluencias",it:"conflu&ecirc;ncias"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura la distanza tra due o pi punti cliccati sulla mappa (minore distanza). Il calcolo della distanza approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"dist&acirc;ncia",en:"distance",es:"distancia",it:"distncia"}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el &aacute;rea de un pol&iacute;gono dibujado sobre la pantalla. El c&aacute;lculo del &aacute;rea es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"&aacute;rea",en:"area",es:"&aacute;rea",it:"&aacute;rea"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema seleccionado. El tema debe tener campos con valores num&eacute;ricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como &aacute;reas de influencia o selecci&oacute;n por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os bot&otilde;es e outras caracter&iacute;sticas visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Esta&ccedil;&otilde;es METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Esta&ccedil;&otilde;es metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"L&iacute;nea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"N&atilde;o existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"N&atilde;o existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navega&ccedil;&atilde;o com o mouse",en:"Mouse navigation",es:"Navegaci&oacute;n con el rat&oacute;n",it:"Navega&ccedil;&atilde;o com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"Mapa de refer&ecirc;ncia"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atm&oacute;sfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites pol&iacute;ticos",en:"Political boundaries",es:"L&iacute;mites pol&iacute;ticos",it:"Limites pol&iacute;ticos"}],"ge9":[{pt:"Constru&ccedil;&otilde;es em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Constru&ccedil;&otilde;es em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"P&aacute;gina principal",en:"Home",es:"Inicio",it:"P&aacute;gina principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de men&uacute;s",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores",en:"option visible only for editors",es:"opci&oacute;n visible solo para editores",it:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores"}],"x8":[{pt:"Sistema de administra&ccedil;&atilde;o",en:"Admin. System",es:"Sistema de administraci&oacute;n",it:"Sistema de administra&ccedil;&atilde;o"}],"x9":[{pt:"Editar &aacute;rvore",en:"Edit tree",es:"Editar &aacute;rbol",it:"Editar &aacute;rvore"}],"x10":[{pt:"Editar menus do cat&aacute;logo",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas n&atilde;o encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas n&atilde;o encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"n&atilde;o",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor n&atilde;o definido",en:"Value not set",es:"Valor no establecido",it:"Valor n&atilde;o definido"}],"x17":[{pt:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa",en:"This option only affects the printing of the map",es:"Esta opci&oacute;n s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa"}],"x18":[{pt:"Nome n&atilde;o definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Coment&aacute;rios de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o pol&iacute;gono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el pol&iacute;gono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa opera&ccedil;&atilde;o n&atilde;o funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operaci&oacute;n no funciona en esta interfaz",it:""}],"x22":[{pt:"Op&ccedil;&atilde;o n&atilde;o dispon&iacute;vel",en:"Option not available",es:"Opci&oacute;n no disponible",it:"Opcin no disponible"}],"x23":[{pt:"Dire&ccedil;&atilde;o",en:"",es:"Direcci&oacute;n",it:"Direction"}],"x25":[{pt:"M&eacute;todo para calcular dist&acirc;ncias",en:"Method to calculate distances",es:"M&eacute;todo para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"Realmente desea salir?",it:""}],"x27":[{pt:"Usu&aacute;rio",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contrase&ntilde;a",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Recuperar senha",en:"Send password",es:"Enviar la contrasena",it:""}],"x33":[{pt:"Escolha um tema da lista",en:"",es:"",it:""}],"x34":[{pt:"Lugar",en:"",es:"",it:""}],"x35":[{pt:"Escolha um tipo de busca nas propriedades",en:"",es:"",it:""}],"x36":[{pt:"Digite uma palavra para busca!",en:"",es:"",it:""}],"x37":[{pt:"Onde ser&aacute; feita a busca",en:"",es:"",it:""}],"x38":[{pt:"Servi&ccedil;os de busca externos",en:"",es:"",it:""}],"x39":[{pt:"Temas existentes no mapa",en:"",es:"",it:""}],"x40":[{pt:"Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber opera&ccedil;&otilde;es de busca",en:"",es:"",it:""}],"x41":[{pt:"Nada encontrado nos temas ou nenhum tema permite busca",en:"",es:"",it:""}],"x42":[{pt:"Nada encontrado em ",en:"",es:"",it:""}],"x43":[{pt:"Erro ao acessar o servi&ccedil;o",en:"",es:"",it:""}],"x44":[{pt:"Nuvem Flash",en:"",es:"",it:""}],"x45":[{pt:"Diret&oacute;rios",en:"",es:"",it:""}],"x46":[{pt:"Conex&atilde;o WMS-T",en:"",es:"",it:""}],"x47":[{pt:"Conex&atilde;o GeoRSS",en:"",es:"",it:""}],"x48":[{pt:"Rota",en:"",es:"",it:""}],"x49":[{pt:"Coordenadas aproximadas",en:"",es:"",it:""}],"x50":[{pt:"Feche para parar",en:"",es:"",it:""}],"x51":[{pt:"Sele&ccedil;&atilde;o",en:"",es:"",it:""}],"x52":[{pt:"Alterar senha",en:"",es:"",it:""}],"x53":[{pt:"Upload de WMC",en:"",es:"",it:""}],"x54":[{pt:"Perfil",en:"",es:"",it:""}],"x55":[{pt:"Salva o tema",en:"",es:"",it:""}],"x56":[{pt:"Topon&iacute;mia",en:"",es:"",it:""}],"x57":[{pt:"Cartogramas estat&iacute;sticos",en:"",es:"",it:""}],"x58":[{pt:"Continua",en:"",es:"",it:""}],"x59":[{pt:"Localiza limite",en:"",es:"",it:""}],"x60":[{pt:"Cartogramas",en:"",es:"",it:""}],"x61":[{pt:"Filtra limite",en:"",es:"",it:""}],"x62":[{pt:"Remover",en:"",es:"",it:""}],"x63":[{pt:"Para salvar as configura&ccedil;&otilde;es de uma camada,<br> utilize a op&ccedil;&atilde;o existente na &aacute;rvore de camadas no n&oacute; correspondente ao tema (basta expandir o tema para visualizar as op&ccedil;&otilde;es)<br><br>",en:"",es:"",it:""}],"x64a":[{pt:"Congela a vis&atilde;o atual",en:"",es:"",it:""}],"x64":[{pt:"Item",en:"",es:"",it:""}],"x65":[{pt:"Buscando itens...",en:"",es:"",it:""}],"x66":[{pt:"Ocorreu um erro",en:"",es:"",it:""}],"x67":[{pt:"Comunidade i3Geo",en:"",es:"",it:""}],"x68":[{pt:"Vers&atilde;o",en:"",es:"",it:""}],"x69":[{pt:"Pressione a tecla CTRL junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"",es:"",it:""}],"x70":[{pt:"Utilize os dedos em um movimento de pin&ccedil;a para definir a &aacute;rea que ser&aacute; aproximada ou afastada",en:"",es:"",it:""}],"x71":[{pt:"Aplicativos estat&iacute;sticos cadastrados",en:"",es:"",it:""}],"x72":[{pt:"Lista de mapas cadastrados",en:"",es:"",it:""}],"x73":[{pt:"Direciona para a versao adaptada para dispositivos moveis?",en:"",es:"",it:""}],"x74":[{pt:"Fecha",en:"Close",es:"",it:""}],"x75":[{pt:"Cancela",en:"Cancel",es:"",it:""}],"x76":[{pt:"O tema j&aacute;existe no mapa. Adiciona novamente?",en:"",es:"",it:""}],"x77":[{pt:"Nome do novo marcador",en:"",es:"",it:""}],"x78":[{pt:"Copie os marcadores e cole em um editor para guard&aacute;-los",en:"",es:"",it:""}],"x79":[{pt:"Marcadores",en:"Bookmarks",es:"Marcadores",it:""}],"x80":[{pt:"Exportar",en:"Export",es:"Exportar",it:""}],"x81":[{pt:"Importar",en:"Import",es:"Importar",it:""}],"x82":[{pt:"Marcar regi&atilde;o",en:"",es:"",it:""}],"x83":[{pt:"Cole os marcadores para import&aacute;-los",en:"",es:"",it:""}],"x84":[{pt:"Exportar SHP",en:"",es:"",it:""}],"x85":[{pt:"Visualizador de WMS da INDE-Br",en:"",es:"",it:""}],"x86":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x87":[{pt:"Limites e localidades",en:"",es:"",it:""}],"x88":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x89":[{pt:"Editar cadastro",en:"",es:"",it:""}],"x90":[{pt:"Mapas cadastrados",en:"",es:"",it:""}],"x91":[{pt:"Feche para parar. Desligue o tema para ver o efeito",en:"",es:"",it:""}],"x92":[{pt:"Escolha uma camada",en:"",es:"",it:""}],"x93":[{pt:"Localiza&ccedil;&atilde;o do usu&aacute;rio",en:"",es:"",it:""}],"x94":[{pt:"Remove as figuras",en:"",es:"",it:""}]};
3 3 \ No newline at end of file
... ...
classesjs/dicionario.js
... ... @@ -2193,6 +2193,13 @@ pt:&quot;Localiza&amp;ccedil;&amp;atilde;o do usu&amp;aacute;rio&quot;,
2193 2193 en:"",
2194 2194 es:"",
2195 2195 it:""
  2196 +}],
  2197 +"x94":[
  2198 +{
  2199 +pt:"Remove as figuras",
  2200 +en:"",
  2201 +es:"",
  2202 +it:""
2196 2203 }]
2197 2204 };
2198 2205 //YAHOO.log("carregou dicionario", "Classes i3geo");
... ...
classesjs/i3geo_tudo_compacto6.js
... ... @@ -356,16 +356,16 @@ BalloonConfig=function(balloon,set){set=set||&#39;&#39;;if(!balloon.configured||set==&#39;GB
356 356 var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width+"px";this.height=height+"px";this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&amp;/g,'&amp;amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];var adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1};
357 357 i3GEOF=[];YAHOO.namespace("i3GEO");var i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaMobile()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);exit}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=YAHOO.lang.JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.configura.guardaExtensao=false}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltimaExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp){temp=temp.replace(/[\+]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);exit}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
358 358 if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},listaTodasChaves:function(obj){var keys,key="";keys=[];for(key in obj){keys.push(key)}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,criaNo;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=true}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=true;criaNo=function(obj,noDestino){var trad,i,j,linha,conteudo,temaNode,c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){trad=$trad(linha.text);if(!trad){trad=linha.text}conteudo="<a href='#' onclick='"+linha.url+"'>"+trad+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,noDestino,false,true);temaNode.enableHighlight=false;if(obj.propriedades[i].propriedades){criaNo(obj.propriedades[i],temaNode)}}};criaNo(obj,tempNode);arvore.collapseAll();arvore.draw();return arvore},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;novoel.id=id;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<span class=digitar onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' ><input onchange=\""+onch+"\" tabindex='0' onclick='javascript:this.select();' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' /></span>"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci,w,h){if(!w){w=5}if(!h){h=5}if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-(h/2))+"px";i.left=(xi-(w/2))+"px";i.width=w+"px";i.height=h+"px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width=w+"px";temp.height=h+"px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.Panel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},getScrollHeight:function(){var mx=Math.max,d=document;return mx(mx(d.body.scrollHeight,d.documentElement.scrollHeight),mx(d.body.offsetHeight,d.documentElement.offsetHeight),mx(d.body.clientHeight,d.documentElement.clientHeight))},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;try{for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[2]&&t[2]=="dicionario_script"){return false}if(t[0]===texto){return true}}return false}catch(e){return false}},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo,estilo,yui){if(onde&&onde!==""){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(!nome){nome=""}if(!multiplo){multiplo=false}if(!estilo||estilo==""){estilo="font-size: 12px;width: 95%;"}if(!yui){yui=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas='',n,nome="";if(yui===true){comboTemas='<input type="button" name='+id+'_button id="'+id+'" value="'+$trad("x33")+'&nbsp;&nbsp;">';id=id+"select";nome=id}if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas+="<select style='"+estilo+"' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas+="<select style='"+estilo+"' id='"+id+"' name='"+nome+"'>"}if(yui===false){comboTemas+="<option value=''>----</option>"}for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="locais"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="editavel"){temp=i3GEO.arvoreDeCamadas.filtraCamadas("editavel","SIM","igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(temp)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}},checkCombo:function(id,nomes,valores,estilo,funcaoclick,ids,idschecked){var temp,i,combo="",n=valores.length;if(n>0){combo="<div style='"+estilo+"'><table class=lista3 id="+id+" >";for(i=0;i<n;i++){temp="";if(idschecked&&idschecked[i]){temp="checked"}if(!ids){combo+="<tr><td><input "+temp+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}else{combo+="<tr><td><input "+temp+" id="+ids[i]+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}}combo+="</table></div>"}return combo},valoresCheckCombo:function(id){var el=$i(id),res=[],n,i;if(el){el=el.getElementsByTagName("input");n=el.length;for(i=0;i<n;i++){if(el[i].checked===true){res.push(el[i].value)}}}return res},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left;width:"+size+" cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome,alias){if(!alias){alias="sim"}if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i,nm;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){if(alias=="sim"){nm=retorno.data.valores[i].alias;if(nm===""){nm=retorno.data.valores[i].item}}else{nm=retorno.data.valores[i].item}ins.push("<option value='"+retorno.data.valores[i].item+"' >"+nm+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo,ordenacao){if(!ordenacao||ordenacao==""){ordenacao=="nao"}if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >"+$trad("x65")+"</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){if(ordenacao==="sim"){ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td>Ordem</td>")}else{ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td></td>")}n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left;cursor:text;width:"+size+"' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text value='"+retorno.data.valores[i].item+"' /></td>");if(ordenacao==="sim"){ins.push("<td><input style='text-align:left; cursor:text;' id='ordem_"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='3' value='"+i+"' /></td>")}else{ins.push("<td></td>")}ins.push("</tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >'+$trad("x66")+'</div>',tipo:"erro"}}funcao.call(this,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var c="checked",ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");n=retorno.data.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' "+c+" name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");c="";ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},comboEpsg:function(idCombo,onde,funcaoOnChange,valorDefault){onde=$i(onde);onde.innerHTML="<span style=color:red;font-size:10px; >buscando...</span>";var monta=function(retorno){var ins=[],i,n;if(retorno.data!==undefined){n=retorno.data.length;ins.push("<select id='"+idCombo+"' onChange='"+funcaoOnChange+"(this)' >");for(i=0;i<n;i++){ins.push("<option value='"+retorno.data[i].codigo+"'>"+retorno.data[i].nome+"</option>")}ins.push("</select>");ins=ins.join('');onde.innerHTML=ins;$i(idCombo).value=valorDefault}else{onde.innerHTML='<div class=erro >Ocorreu um erro</div>'}};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container,mantem,onde){var temp=$i(idatual),botoes="",ndiv=document.createElement("div"),nids,i,fundo;if(!mantem){mantem=false}if(temp&&mantem==false){$i(container).removeChild(temp)}fundo="#F2F2F2";$i(container).style.backgroundColor="white";botoes="<table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){botoes+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){botoes+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}botoes+="</tr></table>";var ativaBotoes=function(anterior,proxima,idatual){var i;new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}};if(onde){$i(onde).innerHTML=botoes}else{texto=texto+"<br><br>"+botoes}if(!document.getElementById(idatual)){ndiv.id=idatual;ndiv.innerHTML=texto;$i(container).appendChild(ndiv)}ativaBotoes(anterior,proxima,idatual);temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome,nomejs,nomefuncao){if(!nomejs){nomejs="index.js"}if(!nomefuncao){nomefuncao="i3GEOF."+nome+".criaJanelaFlutuante();"}var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/"+nomejs;if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde("i3GEOF."+nome+"_script"+"aguarde","Carregando JS");i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}else{i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,temp,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento+"&locaplic="+i3GEO.configura.locaplic,nx="",texto="",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";if(i3GEO&&i3GEO.arvoreDeCamadas){ins+="<div id='i3geo_janelaCorRampComboCabeca' class='comboTemasCabecalho' style='top:0px;'> ------</div>"}ins+="&nbsp;&nbsp;&nbsp;"+texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="380px";wdocaiframe.style.width="100%";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.Panel(id,{height:"430px",modal:false,width:"280px",fixedcenter:fix,constraintoviewport:true,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe;if($i("i3geo_janelaCorRampComboCabeca")){temp=function(){var p,tema=$i("i3geo_janelaCorRampComboCabecaSel").value,funcao=function(retorno){parent.frames["i3geo_janelaCorRampi"].document.getElementById("ncores").value=retorno.data.length};if(tema!==""){i3GEO.mapa.ativaTema(tema);p=i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=editalegenda&opcao=edita&tema="+tema;i3GEO.util.ajaxGet(p,funcao);cp=new cpaint()}};i3GEO.janela.comboCabecalhoTemas("i3geo_janelaCorRampComboCabeca","i3geo_janelaCorRampComboCabecaSel","none","ligados",temp)}},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectTierTablet");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},detectaMobile:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret},ajaxGet:function(sUrl,funcaoRetorno){sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');re=new RegExp("%3A","g");sUrl=sUrl.replace(re,':');var falhou=function(e){},callback={success:function(o){try{funcaoRetorno.call("",YAHOO.lang.JSON.parse(o.responseText))}catch(e){falhou(e)}},failure:falhou,argument:{foo:"foo",bar:"bar"}};YAHOO.util.Connect.asyncRequest("GET",sUrl,callback)},verifica_html5_storage:function(){if(typeof(Storage)!=="undefined"){return true}else{return false}},pegaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){return window.localStorage[item]}else{return false}},limpaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){window.localStorage.clear(item)}},gravaDadosLocal:function(item,valor){if(i3GEO.util.verifica_html5_storage()){window.localStorage[item]=valor;return true}else{return false}},extGeo2OSM:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1<=180&&temp[0]*1>=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(projWGS84,proj900913);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(projWGS84,proj900913);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},extOSM2Geo:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1>=180||temp[0]*1<=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(proj900913,projWGS84);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(proj900913,projWGS84);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},navegadorDir:function(obj,listaShp,listaImg,listaFig){if(!obj){listaShp=true;listaImg=true;listaFig=true}var temp=function(){i3GEOF.navegarquivos.iniciaDicionario(obj,listaShp,listaImg,listaFig)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorDir()","navegarquivos","navegarquivos","index.js",temp)},navegadorPostgis:function(obj,conexao,tipo){if(!obj){conexao=""}if(!tipo){tipo="sql"}var temp=function(){i3GEOF.navegapostgis.iniciaDicionario(obj,conexao,tipo)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorPostgis()","navegapostgis","navegapostgis","index.js",temp)},base64encode:function(str){var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i<len){c1=str.charCodeAt(i++)&0xff;if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break}c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break}c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F)}return out},base64decode:function(str){var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i<len){do{c1=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c1==-1);if(c1==-1)break;do{c2=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c2==-1);if(c2==-1)break;out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3]}while(i<len&&c3==-1);if(c3==-1)break;out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4]}while(i<len&&c4==-1);if(c4==-1)break;out+=String.fromCharCode(((c3&0x03)<<6)|c4)}return out}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};
359   -g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:""}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"N&atilde;o imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opci&oacute;n de impresi&oacute;n del mapa",it:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Anima&ccedil;&atilde;o",en:"Animation",es:"Animaci&oacute;n",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Propriet"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usu&aacute;rio",en:"User manual",es:"Manual de usuario",it:"Manual do usu&aacute;rio"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico Brazil",es:"Software p&uacute;blico Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de pol&iacute;gonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grat&iacute;la de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grat&iacute;la de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Points distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Pol&iacute;gonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro m&eacute;dio",en:"Middle center",es:"Centro medio",it:"Centro m&eacute;dio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aqu&iacute; &oacute; haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:""}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:""}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non conosciuta"}],"t12":[{pt:"Excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transpar&ecirc;ncia do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a altera&ccedil;&atilde;o da forma de representa&ccedil;&atilde;o desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gr&aacute;fico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t37a":[{pt:"Tema com gr&aacute;ficos",en:"Theme with chart",es:"Tema con Gr&aacute;fico",it:"Grafico"}],"t37b":[{pt:"Gr&aacute;fico interativo",en:"Interactive chart",es:"Gr&aacute;fico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padr&atilde;o SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para est&aacute;ndar SLD.",it:"Exporta a legenda para o padr&atilde;o SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa ser&aacute; actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa tem&aacute;tico 3D",en:"Thematic map 3D",es:"Mapa tem&aacute;tico 3D",it:"Mapa tem&aacute;tico 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"Code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conex&otilde;es",en:"Conections",es:"Conexiones",it:"Conex&otilde;es"}],"a16":[{pt:"Servi&ccedil;os",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Cat&aacute;logo",en:"Catalog",es:"Cat&aacute;logo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida",en:"Quick search",es:"B&uacute;squeda r&aacute;pida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"Dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a a la regi&oacute;n indicada con un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la regi&oacute;n visible en el mapa. Despu&eacute;s de activada, haga clic y arrastre el rat&oacute;n sobre el mapa para mover la regi&oacute;n visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"Clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarse, detenga el rat&oacute;n por un momento en el punto deseado o haga click en &eacute;l.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensi&oacute;n geogr&aacute;fica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"Extens&atilde;o atual",en:"Actual extent",es:"Extensi&oacute; actual",it:"extens&atilde;o atual"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"mapa de refer&ecirc;ncia"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikip&eacute;dia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikip&eacute;dia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"conflu&ecirc;ncias",en:"Confluences",es:"Confluencias",it:"conflu&ecirc;ncias"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura la distanza tra due o pi punti cliccati sulla mappa (minore distanza). Il calcolo della distanza approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"dist&acirc;ncia",en:"distance",es:"distancia",it:"distncia"}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el &aacute;rea de un pol&iacute;gono dibujado sobre la pantalla. El c&aacute;lculo del &aacute;rea es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"&aacute;rea",en:"area",es:"&aacute;rea",it:"&aacute;rea"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema seleccionado. El tema debe tener campos con valores num&eacute;ricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como &aacute;reas de influencia o selecci&oacute;n por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os bot&otilde;es e outras caracter&iacute;sticas visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Esta&ccedil;&otilde;es METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Esta&ccedil;&otilde;es metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"L&iacute;nea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"N&atilde;o existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"N&atilde;o existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navega&ccedil;&atilde;o com o mouse",en:"Mouse navigation",es:"Navegaci&oacute;n con el rat&oacute;n",it:"Navega&ccedil;&atilde;o com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"Mapa de refer&ecirc;ncia"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atm&oacute;sfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites pol&iacute;ticos",en:"Political boundaries",es:"L&iacute;mites pol&iacute;ticos",it:"Limites pol&iacute;ticos"}],"ge9":[{pt:"Constru&ccedil;&otilde;es em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Constru&ccedil;&otilde;es em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"P&aacute;gina principal",en:"Home",es:"Inicio",it:"P&aacute;gina principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de men&uacute;s",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores",en:"option visible only for editors",es:"opci&oacute;n visible solo para editores",it:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores"}],"x8":[{pt:"Sistema de administra&ccedil;&atilde;o",en:"Admin. System",es:"Sistema de administraci&oacute;n",it:"Sistema de administra&ccedil;&atilde;o"}],"x9":[{pt:"Editar &aacute;rvore",en:"Edit tree",es:"Editar &aacute;rbol",it:"Editar &aacute;rvore"}],"x10":[{pt:"Editar menus do cat&aacute;logo",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas n&atilde;o encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas n&atilde;o encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"n&atilde;o",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor n&atilde;o definido",en:"Value not set",es:"Valor no establecido",it:"Valor n&atilde;o definido"}],"x17":[{pt:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa",en:"This option only affects the printing of the map",es:"Esta opci&oacute;n s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa"}],"x18":[{pt:"Nome n&atilde;o definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Coment&aacute;rios de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o pol&iacute;gono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el pol&iacute;gono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa opera&ccedil;&atilde;o n&atilde;o funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operaci&oacute;n no funciona en esta interfaz",it:""}],"x22":[{pt:"Op&ccedil;&atilde;o n&atilde;o dispon&iacute;vel",en:"Option not available",es:"Opci&oacute;n no disponible",it:"Opcin no disponible"}],"x23":[{pt:"Dire&ccedil;&atilde;o",en:"",es:"Direcci&oacute;n",it:"Direction"}],"x25":[{pt:"M&eacute;todo para calcular dist&acirc;ncias",en:"Method to calculate distances",es:"M&eacute;todo para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"Realmente desea salir?",it:""}],"x27":[{pt:"Usu&aacute;rio",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contrase&ntilde;a",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Recuperar senha",en:"Send password",es:"Enviar la contrasena",it:""}],"x33":[{pt:"Escolha um tema da lista",en:"",es:"",it:""}],"x34":[{pt:"Lugar",en:"",es:"",it:""}],"x35":[{pt:"Escolha um tipo de busca nas propriedades",en:"",es:"",it:""}],"x36":[{pt:"Digite uma palavra para busca!",en:"",es:"",it:""}],"x37":[{pt:"Onde ser&aacute; feita a busca",en:"",es:"",it:""}],"x38":[{pt:"Servi&ccedil;os de busca externos",en:"",es:"",it:""}],"x39":[{pt:"Temas existentes no mapa",en:"",es:"",it:""}],"x40":[{pt:"Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber opera&ccedil;&otilde;es de busca",en:"",es:"",it:""}],"x41":[{pt:"Nada encontrado nos temas ou nenhum tema permite busca",en:"",es:"",it:""}],"x42":[{pt:"Nada encontrado em ",en:"",es:"",it:""}],"x43":[{pt:"Erro ao acessar o servi&ccedil;o",en:"",es:"",it:""}],"x44":[{pt:"Nuvem Flash",en:"",es:"",it:""}],"x45":[{pt:"Diret&oacute;rios",en:"",es:"",it:""}],"x46":[{pt:"Conex&atilde;o WMS-T",en:"",es:"",it:""}],"x47":[{pt:"Conex&atilde;o GeoRSS",en:"",es:"",it:""}],"x48":[{pt:"Rota",en:"",es:"",it:""}],"x49":[{pt:"Coordenadas aproximadas",en:"",es:"",it:""}],"x50":[{pt:"Feche para parar",en:"",es:"",it:""}],"x51":[{pt:"Sele&ccedil;&atilde;o",en:"",es:"",it:""}],"x52":[{pt:"Alterar senha",en:"",es:"",it:""}],"x53":[{pt:"Upload de WMC",en:"",es:"",it:""}],"x54":[{pt:"Perfil",en:"",es:"",it:""}],"x55":[{pt:"Salva o tema",en:"",es:"",it:""}],"x56":[{pt:"Topon&iacute;mia",en:"",es:"",it:""}],"x57":[{pt:"Cartogramas estat&iacute;sticos",en:"",es:"",it:""}],"x58":[{pt:"Continua",en:"",es:"",it:""}],"x59":[{pt:"Localiza limite",en:"",es:"",it:""}],"x60":[{pt:"Cartogramas",en:"",es:"",it:""}],"x61":[{pt:"Filtra limite",en:"",es:"",it:""}],"x62":[{pt:"Remover",en:"",es:"",it:""}],"x63":[{pt:"Para salvar as configura&ccedil;&otilde;es de uma camada,<br> utilize a op&ccedil;&atilde;o existente na &aacute;rvore de camadas no n&oacute; correspondente ao tema (basta expandir o tema para visualizar as op&ccedil;&otilde;es)<br><br>",en:"",es:"",it:""}],"x64a":[{pt:"Congela a vis&atilde;o atual",en:"",es:"",it:""}],"x64":[{pt:"Item",en:"",es:"",it:""}],"x65":[{pt:"Buscando itens...",en:"",es:"",it:""}],"x66":[{pt:"Ocorreu um erro",en:"",es:"",it:""}],"x67":[{pt:"Comunidade i3Geo",en:"",es:"",it:""}],"x68":[{pt:"Vers&atilde;o",en:"",es:"",it:""}],"x69":[{pt:"Pressione a tecla CTRL junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"",es:"",it:""}],"x70":[{pt:"Utilize os dedos em um movimento de pin&ccedil;a para definir a &aacute;rea que ser&aacute; aproximada ou afastada",en:"",es:"",it:""}],"x71":[{pt:"Aplicativos estat&iacute;sticos cadastrados",en:"",es:"",it:""}],"x72":[{pt:"Lista de mapas cadastrados",en:"",es:"",it:""}],"x73":[{pt:"Direciona para a versao adaptada para dispositivos moveis?",en:"",es:"",it:""}],"x74":[{pt:"Fecha",en:"Close",es:"",it:""}],"x75":[{pt:"Cancela",en:"Cancel",es:"",it:""}],"x76":[{pt:"O tema j&aacute;existe no mapa. Adiciona novamente?",en:"",es:"",it:""}],"x77":[{pt:"Nome do novo marcador",en:"",es:"",it:""}],"x78":[{pt:"Copie os marcadores e cole em um editor para guard&aacute;-los",en:"",es:"",it:""}],"x79":[{pt:"Marcadores",en:"Bookmarks",es:"Marcadores",it:""}],"x80":[{pt:"Exportar",en:"Export",es:"Exportar",it:""}],"x81":[{pt:"Importar",en:"Import",es:"Importar",it:""}],"x82":[{pt:"Marcar regi&atilde;o",en:"",es:"",it:""}],"x83":[{pt:"Cole os marcadores para import&aacute;-los",en:"",es:"",it:""}],"x84":[{pt:"Exportar SHP",en:"",es:"",it:""}],"x85":[{pt:"Visualizador de WMS da INDE-Br",en:"",es:"",it:""}],"x86":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x87":[{pt:"Limites e localidades",en:"",es:"",it:""}],"x88":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x89":[{pt:"Editar cadastro",en:"",es:"",it:""}],"x90":[{pt:"Mapas cadastrados",en:"",es:"",it:""}],"x91":[{pt:"Feche para parar. Desligue o tema para ver o efeito",en:"",es:"",it:""}],"x92":[{pt:"Escolha uma camada",en:"",es:"",it:""}],"x93":[{pt:"Localiza&ccedil;&atilde;o do usu&aacute;rio",en:"",es:"",it:""}]};
  359 +g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:""}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"N&atilde;o imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opci&oacute;n de impresi&oacute;n del mapa",it:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Anima&ccedil;&atilde;o",en:"Animation",es:"Animaci&oacute;n",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Propriet"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usu&aacute;rio",en:"User manual",es:"Manual de usuario",it:"Manual do usu&aacute;rio"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico Brazil",es:"Software p&uacute;blico Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de pol&iacute;gonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grat&iacute;la de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grat&iacute;la de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Points distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Pol&iacute;gonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro m&eacute;dio",en:"Middle center",es:"Centro medio",it:"Centro m&eacute;dio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aqu&iacute; &oacute; haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:""}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:""}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non conosciuta"}],"t12":[{pt:"Excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transpar&ecirc;ncia do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a altera&ccedil;&atilde;o da forma de representa&ccedil;&atilde;o desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gr&aacute;fico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t37a":[{pt:"Tema com gr&aacute;ficos",en:"Theme with chart",es:"Tema con Gr&aacute;fico",it:"Grafico"}],"t37b":[{pt:"Gr&aacute;fico interativo",en:"Interactive chart",es:"Gr&aacute;fico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padr&atilde;o SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para est&aacute;ndar SLD.",it:"Exporta a legenda para o padr&atilde;o SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa ser&aacute; actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa tem&aacute;tico 3D",en:"Thematic map 3D",es:"Mapa tem&aacute;tico 3D",it:"Mapa tem&aacute;tico 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"Code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conex&otilde;es",en:"Conections",es:"Conexiones",it:"Conex&otilde;es"}],"a16":[{pt:"Servi&ccedil;os",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Cat&aacute;logo",en:"Catalog",es:"Cat&aacute;logo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida",en:"Quick search",es:"B&uacute;squeda r&aacute;pida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"Dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a a la regi&oacute;n indicada con un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la regi&oacute;n visible en el mapa. Despu&eacute;s de activada, haga clic y arrastre el rat&oacute;n sobre el mapa para mover la regi&oacute;n visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"Clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarse, detenga el rat&oacute;n por un momento en el punto deseado o haga click en &eacute;l.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensi&oacute;n geogr&aacute;fica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"Extens&atilde;o atual",en:"Actual extent",es:"Extensi&oacute; actual",it:"extens&atilde;o atual"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"mapa de refer&ecirc;ncia"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikip&eacute;dia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikip&eacute;dia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"conflu&ecirc;ncias",en:"Confluences",es:"Confluencias",it:"conflu&ecirc;ncias"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura la distanza tra due o pi punti cliccati sulla mappa (minore distanza). Il calcolo della distanza approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"dist&acirc;ncia",en:"distance",es:"distancia",it:"distncia"}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el &aacute;rea de un pol&iacute;gono dibujado sobre la pantalla. El c&aacute;lculo del &aacute;rea es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"&aacute;rea",en:"area",es:"&aacute;rea",it:"&aacute;rea"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema seleccionado. El tema debe tener campos con valores num&eacute;ricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como &aacute;reas de influencia o selecci&oacute;n por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os bot&otilde;es e outras caracter&iacute;sticas visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Esta&ccedil;&otilde;es METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Esta&ccedil;&otilde;es metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"L&iacute;nea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"N&atilde;o existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"N&atilde;o existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navega&ccedil;&atilde;o com o mouse",en:"Mouse navigation",es:"Navegaci&oacute;n con el rat&oacute;n",it:"Navega&ccedil;&atilde;o com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"Mapa de refer&ecirc;ncia"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atm&oacute;sfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites pol&iacute;ticos",en:"Political boundaries",es:"L&iacute;mites pol&iacute;ticos",it:"Limites pol&iacute;ticos"}],"ge9":[{pt:"Constru&ccedil;&otilde;es em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Constru&ccedil;&otilde;es em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"P&aacute;gina principal",en:"Home",es:"Inicio",it:"P&aacute;gina principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de men&uacute;s",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores",en:"option visible only for editors",es:"opci&oacute;n visible solo para editores",it:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores"}],"x8":[{pt:"Sistema de administra&ccedil;&atilde;o",en:"Admin. System",es:"Sistema de administraci&oacute;n",it:"Sistema de administra&ccedil;&atilde;o"}],"x9":[{pt:"Editar &aacute;rvore",en:"Edit tree",es:"Editar &aacute;rbol",it:"Editar &aacute;rvore"}],"x10":[{pt:"Editar menus do cat&aacute;logo",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas n&atilde;o encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas n&atilde;o encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"n&atilde;o",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor n&atilde;o definido",en:"Value not set",es:"Valor no establecido",it:"Valor n&atilde;o definido"}],"x17":[{pt:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa",en:"This option only affects the printing of the map",es:"Esta opci&oacute;n s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa"}],"x18":[{pt:"Nome n&atilde;o definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Coment&aacute;rios de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o pol&iacute;gono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el pol&iacute;gono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa opera&ccedil;&atilde;o n&atilde;o funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operaci&oacute;n no funciona en esta interfaz",it:""}],"x22":[{pt:"Op&ccedil;&atilde;o n&atilde;o dispon&iacute;vel",en:"Option not available",es:"Opci&oacute;n no disponible",it:"Opcin no disponible"}],"x23":[{pt:"Dire&ccedil;&atilde;o",en:"",es:"Direcci&oacute;n",it:"Direction"}],"x25":[{pt:"M&eacute;todo para calcular dist&acirc;ncias",en:"Method to calculate distances",es:"M&eacute;todo para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"Realmente desea salir?",it:""}],"x27":[{pt:"Usu&aacute;rio",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contrase&ntilde;a",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Recuperar senha",en:"Send password",es:"Enviar la contrasena",it:""}],"x33":[{pt:"Escolha um tema da lista",en:"",es:"",it:""}],"x34":[{pt:"Lugar",en:"",es:"",it:""}],"x35":[{pt:"Escolha um tipo de busca nas propriedades",en:"",es:"",it:""}],"x36":[{pt:"Digite uma palavra para busca!",en:"",es:"",it:""}],"x37":[{pt:"Onde ser&aacute; feita a busca",en:"",es:"",it:""}],"x38":[{pt:"Servi&ccedil;os de busca externos",en:"",es:"",it:""}],"x39":[{pt:"Temas existentes no mapa",en:"",es:"",it:""}],"x40":[{pt:"Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber opera&ccedil;&otilde;es de busca",en:"",es:"",it:""}],"x41":[{pt:"Nada encontrado nos temas ou nenhum tema permite busca",en:"",es:"",it:""}],"x42":[{pt:"Nada encontrado em ",en:"",es:"",it:""}],"x43":[{pt:"Erro ao acessar o servi&ccedil;o",en:"",es:"",it:""}],"x44":[{pt:"Nuvem Flash",en:"",es:"",it:""}],"x45":[{pt:"Diret&oacute;rios",en:"",es:"",it:""}],"x46":[{pt:"Conex&atilde;o WMS-T",en:"",es:"",it:""}],"x47":[{pt:"Conex&atilde;o GeoRSS",en:"",es:"",it:""}],"x48":[{pt:"Rota",en:"",es:"",it:""}],"x49":[{pt:"Coordenadas aproximadas",en:"",es:"",it:""}],"x50":[{pt:"Feche para parar",en:"",es:"",it:""}],"x51":[{pt:"Sele&ccedil;&atilde;o",en:"",es:"",it:""}],"x52":[{pt:"Alterar senha",en:"",es:"",it:""}],"x53":[{pt:"Upload de WMC",en:"",es:"",it:""}],"x54":[{pt:"Perfil",en:"",es:"",it:""}],"x55":[{pt:"Salva o tema",en:"",es:"",it:""}],"x56":[{pt:"Topon&iacute;mia",en:"",es:"",it:""}],"x57":[{pt:"Cartogramas estat&iacute;sticos",en:"",es:"",it:""}],"x58":[{pt:"Continua",en:"",es:"",it:""}],"x59":[{pt:"Localiza limite",en:"",es:"",it:""}],"x60":[{pt:"Cartogramas",en:"",es:"",it:""}],"x61":[{pt:"Filtra limite",en:"",es:"",it:""}],"x62":[{pt:"Remover",en:"",es:"",it:""}],"x63":[{pt:"Para salvar as configura&ccedil;&otilde;es de uma camada,<br> utilize a op&ccedil;&atilde;o existente na &aacute;rvore de camadas no n&oacute; correspondente ao tema (basta expandir o tema para visualizar as op&ccedil;&otilde;es)<br><br>",en:"",es:"",it:""}],"x64a":[{pt:"Congela a vis&atilde;o atual",en:"",es:"",it:""}],"x64":[{pt:"Item",en:"",es:"",it:""}],"x65":[{pt:"Buscando itens...",en:"",es:"",it:""}],"x66":[{pt:"Ocorreu um erro",en:"",es:"",it:""}],"x67":[{pt:"Comunidade i3Geo",en:"",es:"",it:""}],"x68":[{pt:"Vers&atilde;o",en:"",es:"",it:""}],"x69":[{pt:"Pressione a tecla CTRL junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"",es:"",it:""}],"x70":[{pt:"Utilize os dedos em um movimento de pin&ccedil;a para definir a &aacute;rea que ser&aacute; aproximada ou afastada",en:"",es:"",it:""}],"x71":[{pt:"Aplicativos estat&iacute;sticos cadastrados",en:"",es:"",it:""}],"x72":[{pt:"Lista de mapas cadastrados",en:"",es:"",it:""}],"x73":[{pt:"Direciona para a versao adaptada para dispositivos moveis?",en:"",es:"",it:""}],"x74":[{pt:"Fecha",en:"Close",es:"",it:""}],"x75":[{pt:"Cancela",en:"Cancel",es:"",it:""}],"x76":[{pt:"O tema j&aacute;existe no mapa. Adiciona novamente?",en:"",es:"",it:""}],"x77":[{pt:"Nome do novo marcador",en:"",es:"",it:""}],"x78":[{pt:"Copie os marcadores e cole em um editor para guard&aacute;-los",en:"",es:"",it:""}],"x79":[{pt:"Marcadores",en:"Bookmarks",es:"Marcadores",it:""}],"x80":[{pt:"Exportar",en:"Export",es:"Exportar",it:""}],"x81":[{pt:"Importar",en:"Import",es:"Importar",it:""}],"x82":[{pt:"Marcar regi&atilde;o",en:"",es:"",it:""}],"x83":[{pt:"Cole os marcadores para import&aacute;-los",en:"",es:"",it:""}],"x84":[{pt:"Exportar SHP",en:"",es:"",it:""}],"x85":[{pt:"Visualizador de WMS da INDE-Br",en:"",es:"",it:""}],"x86":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x87":[{pt:"Limites e localidades",en:"",es:"",it:""}],"x88":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x89":[{pt:"Editar cadastro",en:"",es:"",it:""}],"x90":[{pt:"Mapas cadastrados",en:"",es:"",it:""}],"x91":[{pt:"Feche para parar. Desligue o tema para ver o efeito",en:"",es:"",it:""}],"x92":[{pt:"Escolha uma camada",en:"",es:"",it:""}],"x93":[{pt:"Localiza&ccedil;&atilde;o do usu&aacute;rio",en:"",es:"",it:""}],"x94":[{pt:"Remove as figuras",en:"",es:"",it:""}]};
360 360 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id,dic){if(!dic){dic=i3GEO.idioma.DICIONARIO}if(dic[id]){var r,t=dic[id][0];r=t[i3GEO.idioma.ATUAL];if(r==""){r=t["pt"]}return r}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};$trad=function(id,dic){if(!dic){dic=i3GEO.idioma.DICIONARIO}return(i3GEO.idioma.traduzir(id,dic))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){i3GEO.janela.tempoMsg("Problemas com idiomas "+e)}})();
361 361 if(typeof(i3GEO)==='undefined'){var i3GEO={}}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){i3GEO.janela.tempoMsg("i3GEO.php diz: variavel i3GEO.configura.locaplic n&atilde;o esta definida")}if(i3GEO.configura.sid===undefined){i3GEO.janela.tempoMsg("i3GEO.php diz: variavel i3GEO.configura.sid n&atilde;o esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/inserexy2/exec.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}cpJSON.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php","criaLegendaHTML",funcao,"funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){var p=i3GEO.configura.locaplic+"/ferramentas/navegarquivos/exec.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){var p=i3GEO.configura.locaplic+"/ferramentas/navegarquivos/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="&map_file=&funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMapas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/exec.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo,w,h){i3GEO.php.verifica();if(!w){w=""}if(!h){h=""}if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten+"&w="+w+"&h="+h;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){i3GEO.janela.tempoMsg("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=selecaobox&ext="+i3GEO.util.extOSM2Geo(box)+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid,checked){var s,p,camadaArvore,par,ck;if(!locaplic||locaplic===""){locaplic=i3GEO.configura.locaplic}if(!sid||sid===""){sid=i3GEO.configura.sid}if(checked||checked==false){s=servico+"&layers="+tema+"&style="+nome;s=s.replace("&&","&");camadaArvore=i3GEO.arvoreDeCamadas.pegaTema(s,"","wmsurl");if(camadaArvore){ck=i3GEO.arvoreDeCamadas.capturaCheckBox(camadaArvore.name);ck.checked=checked;ck.onclick();return}}p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},identifica3:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}ext=i3GEO.util.extOSM2Geo(ext);var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica3&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface=",cp=new cpaint();if(i3GEO.Interface.openlayers.googleLike===true){par+="googlemaps"}else{par+=i3GEO.Interface.ATUAL}cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer,tipo_ws){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer+"&tipo_ws="+tipo_ws;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros&registro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},pegaMetaData:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegametadata&tema="+tema;cpJSON.call(p,"pegametadata",funcao,par)},alteraData:function(funcao,tema,data,removemeta){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data+"&removemeta="+removemeta;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)},listaVariavel:function(funcao,filtro_esquema){if(!filtro_esquema){filtro_esquema=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaVariavel&g_sid="+i3GEO.configura.sid+"&filtro_esquema="+filtro_esquema;i3GEO.util.ajaxGet(p,funcao)},listaMedidaVariavel:function(codigo_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+codigo_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaParametrosMedidaVariavel:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaParametro&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaRegioesMedidaVariavel:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaRegioesMedida&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaValoresParametroMedidaVariavel:function(id_parametro_medida,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaValoresParametro&id_parametro_medida="+id_parametro_medida+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},relatorioVariavel:function(codigo_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=relatorioCompleto&codigo_variavel="+codigo_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaClassificacaoMedida:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaClassificacaoMedida&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaClasseClassificacao:function(id_classificacao,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaClasseClassificacao&id_classificacao="+id_classificacao;i3GEO.util.ajaxGet(p,funcao)},mapfileMedidaVariavel:function(funcao,id_medida_variavel,filtro,todasascolunas,tipolayer,titulolayer,id_classificacao,agruparpor,codigo_tipo_regiao,opacidade){if(!opacidade){opacidade=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=mapfileMedidaVariavel&formato=json&codigo_tipo_regiao="+codigo_tipo_regiao+"&id_medida_variavel="+id_medida_variavel+"&filtro="+filtro+"&todasascolunas="+todasascolunas+"&tipolayer="+tipolayer+"&titulolayer="+titulolayer+"&id_classificacao="+id_classificacao+"&agruparpor="+agruparpor+"&opacidade="+opacidade+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaTipoRegiao:function(funcao,codigo_tipo_regiao){if(!codigo_tipo_regiao){codigo_tipo_regiao=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaTipoRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},mapfileTipoRegiao:function(funcao,codigo_tipo_regiao,outlinecolor,width,nomes){if(!outlinecolor){outlinecolor="255,0,0"}if(!width){width=1}if(!nomes){nome="nao"}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=mapfileTipoRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;p+="&outlinecolor="+outlinecolor+"&width="+width+"&nomes="+nomes;i3GEO.util.ajaxGet(p,funcao)},listaHierarquiaRegioes:function(funcao,codigo_tipo_regiao,codigoregiaopai,valorregiaopai){if(!codigoregiaopai){codigoregiaopai=""}if(!valorregiaopai){valorregiaopai=""}if(!codigo_tipo_regiao){codigo_tipo_regiao=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaHierarquiaRegioes&codigo_tipo_regiao="+codigo_tipo_regiao+"&codigoregiaopai="+codigoregiaopai+"&valorregiaopai="+valorregiaopai+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},aplicaFiltroRegiao:function(funcao,codigo_tipo_regiao,codigo_regiao){var p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=aplicaFiltroRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&codigo_regiao="+codigo_regiao+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaCamadasMetaestat:function(funcao){var p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=listaCamadasMetaestat&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaGruposMapaMetaestat:function(funcao,id_mapa){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaGruposMapa&id_mapa="+id_mapa;i3GEO.util.ajaxGet(p,funcao)},listaTemasMapaMetaestat:function(funcao,id_mapa_grupo){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaTemasMapa&id_mapa_grupo="+id_mapa_grupo;i3GEO.util.ajaxGet(p,funcao)},salvaMapaBanco:function(funcao,titulo,id_mapa,preferencias,geometrias){if(preferencias){try{preferencias=i3GEO.util.base64encode(i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo"))}catch(e){preferencias=""}}else{preferencias=""}if(geometrias){try{geometrias=i3GEO.mapa.compactaLayerGrafico();if(!geometrias){geometrias=""}}catch(e){geometrias=""}}else{geometrias=""}var url=(window.location.href.split("?")[0]),p=i3GEO.configura.locaplic+"/admin/php/mapas.php?";par="funcao=salvaMapfile"+"&url="+url.replace("#","")+"&arqmapfile="+i3GEO.parametros.mapfile+"&nome_mapa="+titulo+"&id_mapa="+id_mapa;cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p+par,"foo",funcao,"&preferenciasbase64="+preferencias+"&geometriasbase64="+geometrias)},marcadores2shp:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?";par="funcao=marcadores2shp";i3GEO.util.ajaxGet(p+par,funcao)}};
362 362 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.configura={iniciaFerramentas:{executa:function(){var q=i3GEO.configura.iniciaFerramentas.quais,i=0;for(i in q){if(q[i].ativa===true){q[i].funcao.call()}}},"quais":{legenda:{ativa:false,largura:302,altura:300,topo:50,esquerda:100,funcao:function(){var q=i3GEO.configura.iniciaFerramentas.quais.legenda;i3GEO.mapa.legendaHTML.libera("sim",q.largura,q.altura,q.topo,q.esquerda)}},locregiao:{ativa:false,funcao:function(){i3GEO.mapa.dialogo.locregiao()}},metaestat:{ativa:false,funcao:function(){i3GEO.mapa.dialogo.metaestat()}}}},guardaExtensao:true,grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu9",text:$trad("x68"),url:"javascript:i3GEO.janela.tempoMsg(i3GEO.parametros.mensageminicia)"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-6_0-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu1",text:$trad("x67"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo1()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"},{id:"omenudataAnalise20",text:"SAIKU - OLAP",url:"javascript:i3GEO.analise.dialogo.saiku()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos6",text:$trad("x72"),url:"javascript:i3GEO.mapa.dialogo.listaDeMapasBanco()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2a",text:"OpenLayers OSM",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/osm.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Servi&ccedil;os WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperb&oacute;lica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas5a",text:$trad("x59"),url:"javascript:i3GEO.mapa.dialogo.locregiao()"},{id:"omenudataFerramentas6a",text:$trad("x61"),url:"javascript:i3GEO.mapa.dialogo.filtraregiao()"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas7a",text:$trad("x64a"),url:"javascript:i3GEO.mapa.dialogo.congelaMapa();"},{id:"omenudataFerramentas8a",text:$trad("p12"),url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"},{id:"omenudataFerramentas9",text:$trad("x85"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.vinde()"},{id:"omenudataFerramentas10",text:$trad("x93"),url:"javascript:i3GEO.mapa.dialogo.geolocal()"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo1()"},{id:"omenudataFerramentas0e",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("x60")+'</b></span>',url:"#"},{id:"omenudataFerramentas1e",text:$trad("x57"),url:"javascript:i3GEO.mapa.dialogo.metaestat()"},{id:"omenudataFerramentas4e",text:$trad("x71"),url:"javascript:i3GEO.mapa.dialogo.metaestatListaMapas()"},{id:"omenudataFerramentas3e",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"100px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"legenda6.htm",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","",$trad("o2"),"janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(DetectaMobile("DetectMobileLong")){i3GEO.janela.tempoMsg($trad("x70"))}else{i3GEO.janela.tempoMsg($trad("x69"))}if(i3GEO.Interface.ATUAL==="googlemaps"){g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}}},{iddiv:"zoomanterior",tipo:"dinamico",dica:"",titulo:"",funcaoonclick:function(){i3GEO.navega.extensaoAnterior()}},{iddiv:"zoomproximo",tipo:"dinamico",dica:"",titulo:"",funcaoonclick:function(){i3GEO.navega.extensaoProximo()}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.eventos.cliquePerm.ativo===false){if(i3GEO.eventos.MOUSECLIQUE.toString().search(i3GEO.configura.funcaoIdentifica)>=0){i3GEO.eventos.MOUSECLIQUE.remove(i3GEO.configura.funcaoIdentifica);return}i3GEO.eventos.MOUSECLIQUE=[i3GEO.configura.funcaoIdentifica]}else{if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoTip)>=0){i3GEO.eventos.MOUSECLIQUEPERM.remove(i3GEO.configura.funcaoTip)}if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoIdentifica)<0){i3GEO.eventos.MOUSECLIQUEPERM.push(i3GEO.configura.funcaoIdentifica)}}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){i3GEO.janela.tempoMsg($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.eventos.cliquePerm.ativo===false){i3GEO.eventos.MOUSECLIQUE=[i3GEO.configura.funcaoTip]}else{if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoIdentifica)>=0){i3GEO.eventos.MOUSECLIQUEPERM.remove(i3GEO.configura.funcaoIdentifica)}if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoTip)<0){i3GEO.eventos.MOUSECLIQUEPERM.push(i3GEO.configura.funcaoTip)}}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=window.location.href;url=url.replace("#","");url=url.split("?");window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","",$trad("x48"));janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="N&atilde;o foi poss&iacute;vel criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);i3GEO.janela.tempoMsg("Clique o ponto de origem da rota")}},{iddiv:"abreJanelaLegenda",tipo:"",dica:$trad("p3"),titulo:$trad("p3"),funcaoonclick:function(){i3GEO.mapa.legendaHTML.libera("sim")}}]}};
363   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
364   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false}),renderer=OpenLayers.Util.getParameters(window.location.href).renderer;style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);renderer=(renderer)?[renderer]:OpenLayers.Layer.Vector.prototype.renderers;i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Edi&ccedil;&atilde;o",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,renderers:renderer,vertexRenderIntent:"vertex"});if(i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}},criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
  363 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(x,y,pixel){var n=x.length,$polygon_area,$i;try{if(n>2){x.push(x[0]);y.push(y[0]);$polygon_area=0;for($i=0;$i<n;$i+=1){$polygon_area+=((x[$i]*y[$i+1])-(y[$i]*x[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
  364 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",layergrafico:null,estilos:{"normal":{fillcolor:'255,0,0',linecolor:'0,0,0',linewidth:'2',circcolor:'255,255,255',textcolor:'100,100,100'},"palido":{fillcolor:'100,100,100',linecolor:'100,100,100',linewidth:'1',circcolor:'100,100,100',textcolor:'100,100,100'},"vermelho":{fillcolor:'100,100,100',linecolor:'255,0,0',linewidth:'1',circcolor:'255,50,0',textcolor:'200,200,200'},"verde":{fillcolor:'100,100,100',linecolor:'100,255,100',linewidth:'1',circcolor:'0,255,0',textcolor:'0,0,0'}},estilosOld:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){if(!i3GEO.desenho.layergrafico){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Graf",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,vertexRenderIntent:"vertex"});if(i3GEO.editorOL&&i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}}},criaContainerRichdraw:function(){i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c,pontosdistobj=i3GEO.analise.pontosdistobj;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){i3GEO.desenho.estiloPadrao=padrao;padrao=i3GEO.desenho.estilosOld[padrao];if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)}},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
365 365 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.Interface={TABLET:false,ALTTABLET:"",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false,pan:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers2131.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade,layer){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade,layer)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},ligaDesliga:function(obj){i3GEO.Interface[i3GEO.Interface.ATUAL].ligaDesliga(obj)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{parametrosMap:{resolutions:[0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.000021457672119140625,0.000010728836059570312,0.000005364418029785156,0.000002682209014892578]},FUNDOTEMA:"yellow",TILES:true,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0003,-0.0003,0.0003,0.0003],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],LAYERFUNDO:"",googleLike:false,redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,temp,j,r,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;if(typeof(OpenLayers)=='undefined'){return}OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";i3GEO.Interface.openlayers.parametrosMap.controls=[];i3GEO.Interface.openlayers.parametrosMap.fractionalZoom=false;if(!i3GEO.Interface.openlayers.parametrosMap.minResolution){i3GEO.Interface.openlayers.parametrosMap.minResolution="auto"}if(!i3GEO.Interface.openlayers.parametrosMap.minExtent){i3GEO.Interface.openlayers.parametrosMap.minExtent=new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3])}if(!i3GEO.Interface.openlayers.parametrosMap.maxResolution){i3GEO.Interface.openlayers.parametrosMap.maxResolution="auto"}if(i3GEO.Interface.openlayers.parametrosMap.numZoomLevels){if(i3GEO.Interface.openlayers.parametrosMap.minResolution=="auto"){temp=0.703125}else{temp=i3GEO.Interface.openlayers.parametrosMap.minResolution}r=[temp];for(j=0;j<(i3GEO.Interface.openlayers.parametrosMap.numZoomLevels-1);j++){temp=temp/2;r.push(temp)}i3GEO.Interface.openlayers.parametrosMap.resolutions=r}if(!i3GEO.Interface.openlayers.parametrosMap.maxExtent){i3GEO.Interface.openlayers.parametrosMap.maxExtent=new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3])}if(!i3GEO.Interface.openlayers.parametrosMap.allOverlays){i3GEO.Interface.openlayers.parametrosMap.allOverlays=false}if(i3GEO.Interface.TABLET===true){i3GEO.Interface.openlayers.parametrosMap.theme=null;i3GEO.Interface.openlayers.parametrosMap.controls=[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true}if(i3GEO.Interface.openlayers.googleLike===true){i3GEO.Interface.openlayers.parametrosMap={numZoomLevels:18,maxResolution:156543.0339,units:'m',projection:new OpenLayers.Projection("EPSG:3857"),displayProjection:new OpenLayers.Projection("EPSG:4326"),controls:[],fractionalZoom:false}};i3geoOL=new OpenLayers.Map('openlayers',i3GEO.Interface.openlayers.parametrosMap)},inicia:function(){if(typeof(OpenLayers)=='undefined'){return}var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].name+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}if(i3GEO.Interface.openlayers.googleLike===true){i3GEO.barraDeBotoes.INCLUIBOTAO.lentei=false}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}i3GEO.configura.iniciaFerramentas.executa();i3GEO.Interface.openlayers.sobeLayersGraficos()},aplicaOpacidade:function(opacidade,layer){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,l,i,camada;if(!layer){layer=""}for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];l=i3geoOL.getLayersByName(camada.name)[0];if(l&&l.isBaseLayer===false){if(layer==""||layer==camada.name){l.setOpacity(opacidade)}}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='op&ccedil;&atilde;o vis&iacute;vel apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}if(i3GEO.Interface.openlayers.googleLike===true){url=configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_OpenLayers_ViewPort")){$i(i3geoOL.id+"_OpenLayers_ViewPort").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){if(camada.cache){urllayer=url+"&cache="+camada.cache+"&layer="+camada.name+"&r="+Math.random()}else{urllayer=url+"&cache=&layer="+camada.name+"&r="+Math.random()}try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(i3GEO.Interface.openlayers.googleLike===false&&camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();if(camada.wmstile==1){layer=new OpenLayers.Layer.TMS(camada.name,camada.wmsurl,{isBaseLayer:false,layername:camada.wmsname,type:'png'})}else{layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes)}if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||(camada.type===0&&camada.cache==="nao")||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}if(opcoes.singleTile===true&&i3GEO.Interface.openlayers.googleLike===false){layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes)}else{if(i3GEO.Interface.openlayers.googleLike===true){layer=new OpenLayers.Layer.OSM(camada.name,urllayer+"&Z=${z}&X=${x}&Y=${y}",{isBaseLayer:false})}else{layer=new OpenLayers.Layer.TMS(camada.name,urllayer,{isBaseLayer:false,serviceVersion:"&tms=",type:"png",layername:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}if(i3GEO.Interface.openlayers.LAYERFUNDO!=""){i3GEO.Interface.openlayers.ativaFundo(i3GEO.Interface.openlayers.LAYERFUNDO)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;if(url.search("\\?")>0){reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");layers[i].url=layers[i].url+"&"+parametro+"="+valor;layers[i].redraw()}}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}i3GEO.Interface.openlayers.sobeLayersGraficos()},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}i3GEO.Interface.openlayers.sobeLayersGraficos()},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){layers[0].setVisibility(obj.checked);if(obj.checked==true){if(navn){i3GEO.Interface.openlayers.atualizaTema("",obj.value)}}}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}},ativaFundo:function(nome){var temp=i3geoOL.getLayersBy("name",nome);if(temp.length>0){i3geoOL.setBaseLayer(temp[0]);if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}i3GEO.Interface.openlayers.LAYERFUNDO=nome}else{i3GEO.Interface.openlayers.LAYERFUNDO=""}},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});if(layers[i].url.search("\\?")>=0){layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&","&foo=");layers[i].url=layers[i].url+"&&"}layers[i].url=layers[i].url.replace("&cache=sim","&cache=nao");if(layers[i].visibility===true){layers[i].redraw()}}}i3GEO.Interface.openlayers.sobeLayersGraficos()},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&","&foo=");layer.url=layer.url+"&&";layer.url=layer.url.replace("&cache=sim","&cache=nao");layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var calcCoord,modoAtual="";calcCoord=function(e){var point,p,lonlat,d,pos,projWGS84,proj900913;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}if(i3GEO.Interface.openlayers.googleLike===true){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(lonlat.lon,lonlat.lat);lonlat=point.transform(proj900913,projWGS84)}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}};i3GEO.eventos.ativa($i(i3geoOL.id+"_OpenLayers_Container"));i3geoOL.events.register("movestart",i3geoOL,function(e){i3GEO.Interface.STATUS.pan=true;var xy;modoAtual="move";i3GEO.barraDeBotoes.BOTAOCLICADO="pan";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.Interface.STATUS.pan=false;i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]);i3GEO.eventos.cliquePerm.status=false;i3GEO.navega.registraExt(i3GEO.parametros.mapexten);i3GEO.Interface.STATUS.pan=false});i3geoOL.events.register("mousemove",i3geoOL,function(e){if(modoAtual==="move"){return}calcCoord(e)})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;ext=i3GEO.util.extGeo2OSM(ext);m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b,true);i3GEO.eventos.cliquePerm.status=true},pan2ponto:function(x,y){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84,proj900913,point,metrica;if(x<180&&x>-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(x,y);metrica=point.transform(projWGS84,proj900913);x=metrica.lon;y=metrica.lat}}i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{ESTILOS:{'Red':[{featureType:'all',stylers:[{hue:'#ff0000'}]}],'Countries':[{featureType:'all',stylers:[{visibility:'off'}]},{featureType:'water',stylers:[{visibility:'on'},{lightness:-100}]}],'Night':[{featureType:'all',stylers:[{invert_lightness:'true'}]}],'Blue':[{featureType:'all',elementType:'geometry',stylers:[{hue:'#0000b0'},{invert_lightness:'true'},{saturation:-30}]}],'Greyscale':[{featureType:'all',stylers:[{saturation:-100},{gamma:0.50}]}],'No roads':[{featureType:'road',stylers:[{visibility:'off'}]}],'Mixed':[{featureType:'landscape',stylers:[{hue:'#00dd00'}]},{featureType:'road',stylers:[{hue:'#dd0000'}]},{featureType:'water',stylers:[{hue:'#000040'}]},{featureType:'poi.park',stylers:[{visibility:'off'}]},{featureType:'road.arterial',stylers:[{hue:'#ffff00'}]},{featureType:'road.local',stylers:[{visibility:'off'}]}],'Chilled':[{featureType:'road',elementType:'geometry',stylers:[{'visibility':'simplified'}]},{featureType:'road.arterial',stylers:[{hue:149},{saturation:-78},{lightness:0}]},{featureType:'road.highway',stylers:[{hue:-31},{saturation:-40},{lightness:2.8}]},{featureType:'poi',elementType:'label',stylers:[{'visibility':'off'}]},{featureType:'landscape',stylers:[{hue:163},{saturation:-26},{lightness:-1.1}]},{featureType:'transit',stylers:[{'visibility':'off'}]},{featureType:'water',stylers:[{hue:3},{saturation:-24.24},{lightness:-38.57}]}]},ESTILOPADRAO:"",MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;google.maps.visualRefresh=true;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");if($i("i3GEOprogressoDiv")){$i("i3GEOprogressoDiv").style.display="block"}montaMapa=function(retorno){var sw,ne,estilo,dobra=$i("i3GEOdobraPagina");if(i3GEO.Interface.googlemaps.ESTILOS&&i3GEO.Interface.googlemaps.ESTILOPADRAO!=""){i3GEO.Interface.googlemaps.MAPOPTIONS.mapTypeId=i3GEO.Interface.googlemaps.ESTILOPADRAO}try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(i3GEO.Interface.googlemaps.ESTILOS&&i3GEO.Interface.googlemaps.ESTILOPADRAO!=""){estilo=i3GEO.Interface.googlemaps.ESTILOS[i3GEO.Interface.googlemaps.ESTILOPADRAO];i3GeoMap.mapTypes.set(i3GEO.Interface.googlemaps.ESTILOPADRAO,new google.maps.StyledMapType(estilo,{name:i3GEO.Interface.googlemaps.ESTILOPADRAO}))}else{i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA)}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}i3GEO.configura.iniciaFerramentas.executa()};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0,camada.cache)}}}i3GEO.Interface.googlemaps.recalcPar()},criaImageMap:function(nomeLayer,cache){var i3GEOTileO="",s;if(cache=="undefined"||cache==undefined){cache=""}s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&cache="+cache+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice,cache){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer,cache);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]);i3GEO.eventos.cliquePerm.status=false;i3GEO.navega.registraExt(i3GEO.parametros.mapexten)});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.navega.registraExt(i3GEO.parametros.mapexten)});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela,pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i].name,listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i].name)}}lista.reverse();n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,(indice));i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade,layer){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;if(!layer){layer=""}for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){if(layer==""||layer==camada.name){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var re=new RegExp(",","g"),pol=mapexten.replace(re," "),ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='op&ccedil;&atilde;o vis&iacute;vel apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&&&&&&&&&&&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomproximo=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomanterior=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}i3GEO.configura.iniciaFerramentas.executa()};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length-1,i,camada,indice,layer;for(i=nlayers;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice==false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar();i3GEO.eventos.cliquePerm.status=false;i3GEO.navega.registraExt(i3GEO.parametros.mapexten)});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","",$trad("u15a"),"i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);$i("i3GEOF.ferramentasGE_c").style.zIndex=100;i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='op&ccedil;&atilde;o vis&iacute;vel apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));if(alt<0){alt=alt*-1}camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};
366   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={TEMASINICIAISLIGADOS:"",TEMASINICIAIS:"",AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(evt){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(evt){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.preventDefault)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){i3GEO.janela.tempoMsg("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{i3GEO.janela.tempoMsg("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:false,ID:"",CAMADASSEMLEGENDA:[],cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg=$i("wlegenda_corpo"),temp=function(retorno){var legenda="",ins,re;re=new RegExp("<img src='' />","g");if(retorno.data!=="erro"&&retorno.data!==undefined){legenda="<div onclick='i3GEO.mapa.legendaHTML.mostraTodosOsTemas()' style=cursor:pointer;font-size:10px;text-align:left; >Mostra tudo</div><br>"+retorno.data.legenda}if(legenda!=""&&idleg){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -35px; top: -22px;">'+$trad("x11")+'</p></div>'}legenda=legenda.replace(re,"");ins+="<div id='corpoLegi' >"+legenda+"</div>";idleg.innerHTML=legenda}i3GEO.mapa.legendaHTML.escondeTemasMarcados()};if(idleg&&idleg.style.display==="block"){if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg){idleg.innerHTML=""}}idleg=$i("wlegenda_corpo");i3GEO.mapa.legendaHTML.obtem(temp)}else{if(idleg){idleg.innerHTML=""}if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},escondeTema:function(tema){var d=$i("legendaLayer_"+tema);if(d){d.style.display="none";i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA.push(tema)}},escondeTemasMarcados:function(){var temas=i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA,n=temas.length,i,temp;for(i=0;i<n;i++){temp=$i(temas[i]);if(temp){temp.style.display="none"}}},mostraTodosOsTemas:function(){i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA=[];i3GEO.mapa.legendaHTML.atualiza()},libera:function(ck,largura,altura,topo,esquerda){if(!ck){ck="nao"}if(!largura){largura=302}if(!altura){altura=300}var cabecalho,minimiza,janela;if(!$i("wlegenda")){cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("wlegenda")};janela=i3GEO.janela.cria(largura+"px",altura+"px","","","",$trad("p3"),"wlegenda",false,"hd",cabecalho,minimiza)}else{janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.show()}$i("wlegenda_corpo").style.backgroundColor="white";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza();if(topo&&esquerda){janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.moveTo(esquerda,topo)}}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{geolocal:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.geolocal()","geolocal","geolocal")},listaDeMapasBanco:function(){if(i3GEO.guias.CONFIGURA["mapas"]){var janela,divid;janela=i3GEO.janela.cria("200px","450px","","","","","i3GEOFsalvaMapaLista",false,"hd");divid=janela[2].id;i3GEO.guias.CONFIGURA["mapas"].click.call(this,divid)}else{window.open(i3GEO.configura.locaplic+"/admin/rssmapas.php","_blank")}},congelaMapa:function(){var url="",idjanela=YAHOO.util.Dom.generateId(),cabecalho=function(){},minimiza=function(){i3GEO.janela.minimiza(idjanela)};if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){url=i3GEO.configura.locaplic+"/ferramentas/congelamapa/openlayers.php?g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);i3GEO.janela.cria("500px","350px",url,"","",$trad("x64"),idjanela,false,"hd",cabecalho,minimiza)}},metaestat:function(){var temp=function(){i3GEOF.metaestat.MULTIPARAMETROS=true;i3GEOF.metaestat.inicia()};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js",temp)},metaestatListaMapas:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()")},preferencias:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias")},locregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.locregiao()","metaestat","locregiao","locregiao.js")},filtraregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraregiao()","metaestat","locregiao","locregiao.js","i3GEOF.locregiao.abreComFiltro()")},animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(x,y){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identifica"&&i3GEO.eventos.cliquePerm.ativo===false){return}i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js",temp=function(){if(x){i3GEOF.identifica.criaJanelaFlutuante(x,y)}else{i3GEOF.identifica.criaJanelaFlutuante()}};i3GEO.util.scriptTag(js,temp,"i3GEOF.identifica_script")}else{if(x){i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,x,y)}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo)}return}},verificaTipDefault:function(e){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identificaBalao"&&i3GEO.eventos.cliquePerm.ativo===false){return}if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}var ntemas,etiquetas,j,retorna,targ="";if(!e){e=window.event}try{if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){targ=null}ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var classeCor,pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span class='toolTipBalaoTitulo'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;classeCor="toolTipBalaoTexto";for(s=0;s<nds;s+=1){ins+="<div class='"+classeCor+"'>";for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}mostra=true}else{ins+="<span>"+valor+"</span><br>";mostra=true}}catch(e){}}if(classeCor==="toolTipBalaoTexto"){classeCor="toolTipBalaoTexto1"}else{classeCor="toolTipBalaoTexto"}ins+="</div>"}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};xy=i3GEO.navega.centroDoMapa();i3GEO.php.identifica3(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}},compactaLayerGrafico:function(){var geos=false,geometrias=[],g=[],n=0,i;if(i3GEO.editorOL&&i3GEO.desenho.layergrafico&&i3GEO.desenho.layergrafico.features){geos=i3GEO.desenho.layergrafico.features;n=geos.length;for(i=0;i<n;i++){g={"atributos":geos[i].attributes,"geometria":geos[i].geometry.toString()};geometrias.push(g)}}g=YAHOO.lang.JSON.stringify(geometrias);return i3GEO.util.base64encode(g)},desCompactaLayerGrafico:function(geometrias){geometrias=YAHOO.lang.JSON.parse(geometrias);if(geometrias.length>0){var inicia=function(){i3GEO.barraDeBotoes.editor.ativaPainel();var n=geometrias.length,i;for(i=0;i<n;i++){i3GEO.editorOL.adicionaFeatureWkt(geometrias[i].geometria,geometrias[i].atributos)}$i(i3GEO.editorOL.layergrafico.id).style.zIndex=5000};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js",inicia,"openlayers.js",true)}},aplicaPreferencias:function(cookies){var props,nprops,i,temp=[],pint;if(!cookies){cookies=i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo")}if(cookies){props=cookies.split("::");nprops=props.length;for(i=0;i<nprops;i++){try{temp=props[i].split("|");pint=parseInt(temp[1],10);if(temp[1]==='true'||temp[1]==='false'){if(temp[1]==='true'){temp[1]=true}if(temp[1]==='false'){temp[1]=false}eval(temp[0]+" = "+temp[1]+";")}else if(pint+"px"==temp[1]){eval(temp[0]+" = '"+temp[1]+"';")}else if(YAHOO.lang.isNumber(pint)){eval(temp[0]+" = "+temp[1]+";")}else{eval(temp[0]+" = '"+temp[1]+"';")}if(temp[0]=="i3GEO.configura.mapaRefDisplay"){i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay",temp[1])}}catch(e){}}}}};
  366 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={TEMASINICIAISLIGADOS:"",TEMASINICIAIS:"",AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(evt){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(evt){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.preventDefault)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){i3GEO.janela.tempoMsg("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{i3GEO.janela.tempoMsg("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:false,ID:"",CAMADASSEMLEGENDA:[],cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg=$i("wlegenda_corpo"),temp=function(retorno){var legenda="",ins,re;re=new RegExp("<img src='' />","g");if(retorno.data!=="erro"&&retorno.data!==undefined){legenda="<div onclick='i3GEO.mapa.legendaHTML.mostraTodosOsTemas()' style=cursor:pointer;font-size:10px;text-align:left; >Mostra tudo</div><br>"+retorno.data.legenda}if(legenda!=""&&idleg){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -35px; top: -22px;">'+$trad("x11")+'</p></div>'}legenda=legenda.replace(re,"");ins+="<div id='corpoLegi' >"+legenda+"</div>";idleg.innerHTML=legenda}i3GEO.mapa.legendaHTML.escondeTemasMarcados()};if(idleg&&idleg.style.display==="block"){if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg){idleg.innerHTML=""}}idleg=$i("wlegenda_corpo");i3GEO.mapa.legendaHTML.obtem(temp)}else{if(idleg){idleg.innerHTML=""}if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},escondeTema:function(tema){var d=$i("legendaLayer_"+tema);if(d){d.style.display="none";i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA.push(tema)}},escondeTemasMarcados:function(){var temas=i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA,n=temas.length,i,temp;for(i=0;i<n;i++){temp=$i(temas[i]);if(temp){temp.style.display="none"}}},mostraTodosOsTemas:function(){i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA=[];i3GEO.mapa.legendaHTML.atualiza()},libera:function(ck,largura,altura,topo,esquerda){if(!ck){ck="nao"}if(!largura){largura=302}if(!altura){altura=300}var cabecalho,minimiza,janela;if(!$i("wlegenda")){cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("wlegenda")};janela=i3GEO.janela.cria(largura+"px",altura+"px","","","",$trad("p3"),"wlegenda",false,"hd",cabecalho,minimiza)}else{janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.show()}$i("wlegenda_corpo").style.backgroundColor="white";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza();if(topo&&esquerda){janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.moveTo(esquerda,topo)}}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{geolocal:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.geolocal()","geolocal","geolocal")},listaDeMapasBanco:function(){if(i3GEO.guias.CONFIGURA["mapas"]){var janela,divid;janela=i3GEO.janela.cria("200px","450px","","","","","i3GEOFsalvaMapaLista",false,"hd");divid=janela[2].id;i3GEO.guias.CONFIGURA["mapas"].click.call(this,divid)}else{window.open(i3GEO.configura.locaplic+"/admin/rssmapas.php","_blank")}},congelaMapa:function(){var url="",idjanela=YAHOO.util.Dom.generateId(),cabecalho=function(){},minimiza=function(){i3GEO.janela.minimiza(idjanela)};if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){url=i3GEO.configura.locaplic+"/ferramentas/congelamapa/openlayers.php?g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);i3GEO.janela.cria("500px","350px",url,"","",$trad("x64"),idjanela,false,"hd",cabecalho,minimiza)}},metaestat:function(){var temp=function(){i3GEOF.metaestat.MULTIPARAMETROS=true;i3GEOF.metaestat.inicia()};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js",temp)},metaestatListaMapas:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()")},preferencias:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias")},locregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.locregiao()","metaestat","locregiao","locregiao.js")},filtraregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraregiao()","metaestat","locregiao","locregiao.js","i3GEOF.locregiao.abreComFiltro()")},animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(x,y){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identifica"&&i3GEO.eventos.cliquePerm.ativo===false){return}i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js",temp=function(){if(x){i3GEOF.identifica.criaJanelaFlutuante(x,y)}else{i3GEOF.identifica.criaJanelaFlutuante()}};i3GEO.util.scriptTag(js,temp,"i3GEOF.identifica_script")}else{if(x){i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,x,y)}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo)}return}},verificaTipDefault:function(e){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identificaBalao"&&i3GEO.eventos.cliquePerm.ativo===false){return}if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}var ntemas,etiquetas,j,retorna,targ="";if(!e){e=window.event}try{if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){targ=null}ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var classeCor,pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span class='toolTipBalaoTitulo'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;classeCor="toolTipBalaoTexto";for(s=0;s<nds;s+=1){ins+="<div class='"+classeCor+"'>";for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}mostra=true}else{ins+="<span>"+valor+"</span><br>";mostra=true}}catch(e){}}if(classeCor==="toolTipBalaoTexto"){classeCor="toolTipBalaoTexto1"}else{classeCor="toolTipBalaoTexto"}ins+="</div>"}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};xy=i3GEO.navega.centroDoMapa();i3GEO.php.identifica3(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}},compactaLayerGrafico:function(){var geos=false,geometrias=[],n=0,i,g;if(i3GEO.editorOL&&i3GEO.desenho.layergrafico&&i3GEO.desenho.layergrafico.features){geos=i3GEO.desenho.layergrafico.features;n=geos.length;for(i=0;i<n;i++){g={"atributos":geos[i].attributes,"geometria":geos[i].geometry.toString()};geometrias.push(g)}}g=YAHOO.lang.JSON.stringify(geometrias);return i3GEO.util.base64encode(g)},desCompactaLayerGrafico:function(geometrias){geometrias=YAHOO.lang.JSON.parse(geometrias);if(geometrias.length>0){var inicia=function(){i3GEO.barraDeBotoes.editor.ativaPainel();var n=geometrias.length,i;for(i=0;i<n;i++){i3GEO.editorOL.adicionaFeatureWkt(geometrias[i].geometria,geometrias[i].atributos)}$i(i3GEO.editorOL.layergrafico.id).style.zIndex=5000};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js",inicia,"openlayers.js",true)}},aplicaPreferencias:function(cookies){var props,nprops,i,temp=[],pint;if(!cookies){cookies=i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo")}if(cookies){props=cookies.split("::");nprops=props.length;for(i=0;i<nprops;i++){try{temp=props[i].split("|");pint=parseInt(temp[1],10);if(temp[1]==='true'||temp[1]==='false'){if(temp[1]==='true'){temp[1]=true}if(temp[1]==='false'){temp[1]=false}eval(temp[0]+" = "+temp[1]+";")}else if(pint+"px"==temp[1]){eval(temp[0]+" = '"+temp[1]+"';")}else if(YAHOO.lang.isNumber(pint)){eval(temp[0]+" = "+temp[1]+";")}else{eval(temp[0]+" = '"+temp[1]+"';")}if(temp[0]=="i3GEO.configura.mapaRefDisplay"){i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay",temp[1])}}catch(e){}}}}};
367 367 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";try{var p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.sobetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.descetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";i3GEO.php.limpasel(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)},tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="";if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)},idtema,valor)}else{i3GEO.janela.tempoMsg($trad("x16"))}},invertestatuslegenda:function(idtema){i3GEO.janela.tempoMsg($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";i3GEO.php.invertestatuslegenda(function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()},idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);i3GEO.php.aplicaCorClasseTema(temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)},idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{i3GEO.janela.tempoMsg($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}if(!$i("janelaLegenda"+idtema)){var janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda},idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js","i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' >&nbsp;&nbsp;&nbsp;</a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}};
368   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={dialogo:{saiku:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku")},graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},graficoInterativo1:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo1()","graficointerativo1","graficointerativo1")},linhaDoTempo:function(){i3GEO.janela.cria("450px","350px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc="",ifr="";try{ifr=$i("wdocai");if(navn){if(ifr){doc=ifr.contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}var ifr=$i("wdocai");ifr.style.width="100%"},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?i3GEO.janela.tempoMsg($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="2px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n+1,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x25")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?i3GEO.janela.tempoMsg("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}}try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}};
  368 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={pontosdistobj:{},dialogo:{saiku:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku")},graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},graficoInterativo1:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo1()","graficointerativo1","graficointerativo1")},linhaDoTempo:function(){i3GEO.janela.cria("450px","350px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc="",ifr="";try{ifr=$i("wdocai");if(navn){if(ifr){doc=ifr.contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}var ifr=$i("wdocai");ifr.style.width="100%"},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?i3GEO.janela.tempoMsg($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{pontos:{},inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();i3GEO.analise.medeDistancia[i3GEO.Interface["ATUAL"]].inicia()},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo_movel" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(i3GEO.analise.pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();if(i3GEO.Interface.ATUAL!=="openlayers"){i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes()}janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer");i3GEO.analise.medeDistancia[i3GEO.Interface["ATUAL"]].fechaJanela()},openlayers:{inicia:function(){var linha,estilo=i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao],controle=i3geoOL.getControlsBy("id","i3GeoMedeDistancia");i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia();i3GEO.analise.medeDistancia.pontos={xpt:[],ypt:[],dist:[]};if(controle.length===0){linha=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},autoActivate:true,id:"i3GeoMedeDistancia",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature,{strokeWidth:estilo.linewidth,strokeColor:estilo.linecolor,origem:"medeDistancia"},{graphicName:"square",pointRadius:10,graphicOpacity:1});i3GEO.desenho.layergrafico.addFeatures([f]);if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}i3GEO.analise.medeDistancia.openlayers.mostraParcial(0,0,0);i3GEO.analise.medeDistancia.openlayers.inicia()},modify:function(point){var n,x1,y1,x2,y2,trecho,parcial,direcao;n=i3GEO.analise.medeDistancia.pontos.ypt.length;if(n>0){x1=i3GEO.analise.medeDistancia.pontos.xpt[n-1];y1=i3GEO.analise.medeDistancia.pontos.ypt[n-1];x2=point.x;y2=point.y;if(i3GEO.Interface.googleLike){temp=i3GEO.util.extOSM2Geo(x1,y1,x2,y2);temp=temp.split(" ");x1=temp[0];y1=temp[1];x2=temp[2];y2=temp[3]}trecho=i3GEO.calculo.distancia(x1,y1,x2,y2);parcial=i3GEO.analise.medeDistancia.openlayers.somaDist();direcao=i3GEO.calculo.direcao(x1,y1,x2,y2);i3GEO.analise.medeDistancia.openlayers.mostraParcial(trecho,parcial,direcao)}},point:function(point){var n,x1,y1,x2,y2,trecho,temp,circ,label,total=0;i3GEO.analise.medeDistancia.pontos.xpt.push(point.x);i3GEO.analise.medeDistancia.pontos.ypt.push(point.y);n=i3GEO.analise.medeDistancia.pontos.ypt.length;if(n>1){x1=i3GEO.analise.medeDistancia.pontos.xpt[n-2];y1=i3GEO.analise.medeDistancia.pontos.ypt[n-2];x2=point.x;y2=point.y;if(i3GEO.Interface.googleLike){temp=i3GEO.util.extOSM2Geo(x1,y1,x2,y2);temp=temp.split(" ");x1=temp[0];y1=temp[1];x2=temp[2];y2=temp[3]}trecho=i3GEO.calculo.distancia(x1,y1,x2,y2);i3GEO.analise.medeDistancia.pontos.dist.push(trecho);total=i3GEO.analise.medeDistancia.openlayers.somaDist();i3GEO.analise.medeDistancia.openlayers.mostraTotal(trecho,total);if($i("pararraios")&&$i("pararraios").checked===true){circ=new OpenLayers.Feature.Vector(OpenLayers.Geometry.Polygon.createRegularPolygon(point,point.distanceTo(new OpenLayers.Geometry.Point(x1,y1)),30),{strokeWidth:1,origem:"medeDistanciaExcluir"},{fill:false,strokeColor:"#FFFFFF"});i3GEO.desenho.layergrafico.addFeatures([circ])}if($i("parartextos")&&$i("parartextos").checked===true){label=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(point.x,point.y),{origem:"medeDistanciaExcluir"},{graphicName:"square",pointRadius:3,strokeColor:"black",graphicOpacity:1,strokeWidth:1,fillColor:"white",label:trecho.toFixed(3),labelAlign:"rb",fontColor:"gray",fontSize:12,fontWeight:"bold"});i3GEO.desenho.layergrafico.addFeatures([label])}}}}});i3geoOL.addControl(linha)}},somaDist:function(){var n,i,total=0;n=i3GEO.analise.medeDistancia.pontos.dist.length;for(i=0;i<n;i++){total+=i3GEO.analise.medeDistancia.pontos.dist[i]}return total},fechaJanela:function(){var temp,controle=i3geoOL.getControlsBy("id","i3GeoMedeDistancia"),f=i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistancia");if(controle.length>0){controle[0].deactivate();i3geoOL.removeControl(controle[0])}if(f&&f.length>0){temp=window.confirm($trad("x94"));if(temp){i3GEO.desenho.layergrafico.destroyFeatures(f)}}f=i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistanciaExcluir");if(f&&f.length>0){i3GEO.desenho.layergrafico.destroyFeatures(f)}},mostraTotal:function(trecho,total){var mostra=$i("mostradistancia_calculo"),texto;if(mostra){texto="<b>atual:</b> "+total.toFixed(3)+" km"+"<b>atual:</b> "+(total*1000).toFixed(2)+" m"+"<br>"+$trad("x25")+": "+i3GEO.calculo.metododistancia;mostra.innerHTML=texto}},mostraParcial:function(trecho,parcial,direcao){var mostra=$i("mostradistancia_calculo_movel"),texto;if(mostra){texto="<b>trecho:</b> "+trecho.toFixed(3)+" km"+"<br><b>total:</b> "+(parcial+trecho).toFixed(3)+" km"+"<br><b>"+$trad("x23")+" (DMS):</b> "+direcao;mostra.innerHTML=texto}}},googlemaps:{inicia:function(){if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="2px";g_tipoacao="mede"}else{i3GEO.desenho.richdraw.fecha();var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},fechaJanela:function(){}},googleearth:{inicia:function(){if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";g_tipoacao="mede"}else{var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},fechaJanela:function(){}},clique:function(){var n,d,decimal,dd,pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n+1,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,pontosdistobj=i3GEO.analise.pontosdistobj,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x25")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?i3GEO.janela.tempoMsg("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,m;pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}}try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}catch(men){}m=i3GEO.calculo.area(pontosdistobj.xtela,pontosdistobj.ytela,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}};
369 369 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,VALORSELETORTIPO:"mapa",PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,W:function(){var w=parseInt(i3GEO.parametros.w,10)/5;if(w<150){w=150}return parseInt(w,10)},H:function(){var h=parseInt(i3GEO.parametros.h,10)/5;if(i3GEO.maparef.W()<=150){return 150}else{return parseInt(h,10)}},inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="border:0px solid black;text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span>&nbsp;";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='mapa' >mapa aual</option>";ins+="<option value='dinamico' >Brasil</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:0px solid black;text-align:left;padding:3px;height: '+i3GEO.maparef.H()+'px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel);if($i("refDinamico")){$i("refDinamico").value=i3GEO.maparef.VALORSELETORTIPO}}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:i3GEO.maparef.H()+27+"px",width:i3GEO.maparef.W()+6+"px",fixedcenter:false,constraintoviewport:false,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height=i3GEO.maparef.H()+"px";$i("i3geo_winRef").style.border="0px solid gray";moveX=pos[0]+i3GEO.parametros.w-i3GEO.maparef.W()+3-i3GEO.maparef.RIGHT;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width=i3GEO.maparef.W()+6+"px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef,i3GEO.maparef.W(),i3GEO.maparef.H());if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef,i3GEO.maparef.W(),i3GEO.maparef.H());if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}};
370 370 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,70,"",nx,ny,"&nbsp;","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}};
371 371 if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 1px 5px 1px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:5,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,funcaoAposRedim,dimensionavel){if(!dimensionavel){dimensionavel==true}if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix="contained";if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" >';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:102;position:absolute;left:3px;top:6px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';ins+='<div class="ft"></div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width='100%';$i(id+'_corpo').style.overflow="auto"}if(waltura==="auto"||dimensionavel==false){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:underlay,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.Panel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null});var resize=new YAHOO.util.Resize(id,{handles:['br'],autoRatio:false,minWidth:10,minHeight:10,status:false,proxy:true,ghost:false,animate:false,useShim:true});resize.on('resize',function(args){this.cfg.setProperty("height",args.height+"px")},janela,true);if(funcaoAposRedim&&funcaoAposRedim!=""){resize.on('endResize',function(args){funcaoAposRedim.call();i3GEO.janela.minimiza()},janela,true)}resize.getProxyEl().style.height="0px"}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[4]);janela.render();janela.bringToTop();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=4}YAHOO.util.Event.addListener($i(id+'_corpo'),"click",YAHOO.util.Event.stopPropagation);if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);temp=$i(id+"_corpo");return([janela,$i(id+"_cabecalho"),temp])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id);if(temp){if(temp.style.display==="none"){temp.style.height="100%"}else{temp.style.height="10%"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");i3GEO.util.removeScriptTag(id+".dicionario_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela=$i(id+"_c");janela.parentNode.removeChild(janela)}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span>&nbsp;<span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},tempoMsg:function(texto,tempo){var pos,janela,attributes,anim,altura=40;janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(!janela){janela=new YAHOO.widget.Panel("i3geoTempoMsg",{width:"220px",fixedcenter:false,underlay:"none",close:false,draggable:false,modal:false,monitorresize:false,iframe:true});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}janela.setBody(texto);altura=70;janela.body.style.padding="5px";janela.body.style.backgroundColor="yellow";if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){janela.body.style.height="0px"}else{janela.body.style.height=altura+"px"}janela.body.style.overflow="hidden";janela.body.onclick=function(){var janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(janela){janela.destroy()}};if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){attributes={height:{to:altura}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.body.style.overflow="auto";janela.body.style.display="block";$i("i3geoTempoMsg_c").style.zIndex=100000});anim.animate()}if(!tempo){tempo=4000}setTimeout(function(){var attributes,anim,janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){if(janela){janela.body.style.overflow="hidden";attributes={height:{to:0}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.destroy()});anim.animate()}}else{janela.destroy()}},tempo)},ativaAlerta:function(){window.alert=function(texto){var textoI,janela=YAHOO.i3GEO.janela.managerAguarde.find("alerta");if(!janela){janela=new YAHOO.widget.SimpleDialog("alerta",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:$trad("x74"),handler:function(){this.destroy()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body)}textoI=janela.cfg.getProperty("text");if(textoI!=""){textoI+="<br>"}texto=textoI+texto;janela.cfg.setProperty("text",texto);janela.show()}},confirma:function(pergunta,w,resposta1,resposta2,funcao1,funcao2){var f1,f2,janela=YAHOO.i3GEO.janela.managerAguarde.find("confirma");if(!w||w==""){w=300}if(!funcao1||funcao1==""){f1=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return true}}else{f1=function(){funcao1.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}if(!funcao2||funcao2==""){f2=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return false}}else{f2=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();funcao2.call()}}if(!resposta1||resposta1==""){resposta1=$trad("x58")}if(!resposta2||resposta2==""){resposta2=$trad("x75")}if(janela){janela.destroy()}janela=new YAHOO.widget.SimpleDialog("confirma",{width:w+"px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:false,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:resposta1,handler:f1},{text:resposta2,handler:f2}],icon:YAHOO.widget.SimpleDialog.ICON_HELP,text:pergunta});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body);janela.show()},prompt:function(pergunta,funcaoOk,valorDefault){if($i("i3GEOjanelaprompt")){return}if(!valorDefault){valorDefault=""}var i="<br><input id='i3GEOjanelaprompt' type=text value='"+valorDefault+"' style='position:relative;top:5px;width:98%;cursor:text;' />";i3GEO.janela.confirma(pergunta+i,"","","",funcaoOk)},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","",$trad("t20"),"opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo,funcaoOnChange){var temp=$i(idDiv);if(temp&&!($i(idCombo))){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao,onButtonClick;container.innerHTML=retorno.dados;botao=new YAHOO.widget.Button(idCombo,{type:"menu",menu:idCombo+"select"});if(i3GEO.temaAtivo!=""){tema=i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo);botao.set("label","<span class='cabecalhoTemas' >"+tema.tema+"</span>&nbsp;&nbsp;")}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span>&nbsp;&nbsp;")}onButtonClick=function(p_sType,p_aArgs){var oMenuItem=p_aArgs[1];if(oMenuItem){if(oMenuItem.value!=""){i3GEO.mapa.ativaTema(oMenuItem.value);botao.set("label","<span class='cabecalhoTemas' >"+oMenuItem.cfg.getProperty("text")+"</span>&nbsp;&nbsp;");if(i3GEOF[ferramenta]){i3GEOF[ferramenta].tema=oMenuItem.value;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}}};botao.getMenu().subscribe("click",onButtonClick)},temp.id,"",false,tipo,"",true)}if(i3GEO.eventos.ATUALIZAARVORECAMADAS.length>20){i3GEO.eventos.ATUALIZAARVORECAMADAS=[]}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};
... ... @@ -374,7 +374,7 @@ if(typeof(i3GEO)===&#39;undefined&#39;){var i3GEO={}}i3GEO.arvoreDeCamadas={TEMPLATELEGE
374 374 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:["","","","","","","","","","","","","","","","","","","","","","","","",""],posicao:0,emAcao:false},TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,registraExt:function(ext){var n=i3GEO.navega.EXTENSOES.lista.length;if(ext==""||ext==i3GEO.navega.EXTENSOES.lista[n-1]){i3GEO.navega.EXTENSOES.posicao=0;i3GEO.navega.EXTENSOES.emAcao=false;return}if(i3GEO.navega.EXTENSOES.emAcao===false){i3GEO.navega.EXTENSOES.lista.shift();i3GEO.navega.EXTENSOES.lista.push(ext);i3GEO.navega.EXTENSOES.posicao=0;i3GEO.navega.EXTENSOES.emAcao=false}i3GEO.navega.EXTENSOES.emAcao=false},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var n=i3GEO.navega.EXTENSOES.lista.length,ext;if(i3GEO.navega.EXTENSOES.posicao>=n){i3GEO.navega.EXTENSOES.posicao=0}ext=i3GEO.navega.EXTENSOES.lista[(n-1)-i3GEO.navega.EXTENSOES.posicao];if(ext==i3GEO.parametros.mapexten){ext=i3GEO.navega.EXTENSOES.lista[(n-2)-i3GEO.navega.EXTENSOES.posicao]}i3GEO.navega.EXTENSOES.posicao++;if(ext&&ext!=""){i3GEO.navega.zoomExt("","","",ext)}else{i3GEO.navega.EXTENSOES.posicao=0}},extensaoProximo:function(){i3GEO.navega.EXTENSOES.posicao--;i3GEO.navega.extensaoAnterior()},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa op&ccedil;&atilde;o.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{boxxini:0,boxyini:0,inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";i3GEO.navega.boxxini=objposicaocursor.telax;i3GEO.navega.boxyini=objposicaocursor.telay;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py,boxxini=i3GEO.navega.boxxini,boxyini=i3GEO.navega.boxyini;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,50,"","center","center",$trad("x50")+"&nbsp;&nbsp;","ativadesativaDestaque");$i(janela[2].id).innerHTML=$trad("x91");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}};
375 375 if(typeof(i3GEO)==='undefined'){var i3GEO={}}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:["i3GEO.eventos.cliquePerm.executa()"],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],MOUSECLIQUEPERM:[i3GEO.configura.funcaoTip],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(exy){if(!exy){i3GEO.eventos.executaEventos(this.MOUSEUP)}else{if(exy.target&&(exy.target.style.zIndex==""||exy.target.style.zIndex==1)){var parente=exy.target.parentNode;if(parente&&(parente.className==="olLayerDiv olLayerGrid"||(parente.childNodes&&parente.childNodes[0].attributes[0].nodeValue==="olTileImage"))){i3GEO.eventos.executaEventos(this.MOUSEUP)}}}},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},cliquePerm:{ativo:true,status:true,executa:function(evt){if(i3GEO.eventos.cliquePerm.ativo===true&&i3GEO.eventos.cliquePerm.status===true){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUEPERM)}},ativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=true}},desativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=false}},ativoinicial:true},executaEventos:function(eventos){if(i3GEO.Interface.STATUS.pan===true){return}var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){if(typeof(eventos[f])==="function"){eventos[f].call()}else{eval(eventos[f])}}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){return}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.cliquePerm.status=true;i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa(exy)}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa(exy)}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}};
376 376 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:true,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true,metaestat:true,idonde:""},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIREGIOES:true,INCLUIINDIBR:true,INCLUIWMSMETAESTAT:true,INCLUIMAPASCADASTRADOS:false,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:true,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");window.setTimeout("i3GEO.arvoreDeTemas.IDHTML = '"+idold+"';",520)},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos n&atilde;o definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,tipo_ws:raiz[i].tipo_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:true},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaRegioes:function(){var monta=function(retorno){var node,nraiz,i,html;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idregioes","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"regioesmetaestat","tid":"metaregiao_"+retorno[i].codigo_tipo_regiao,"nome":retorno[i].nome_tipo_regiao},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,enableHighlight:true,tipoa_tema:"METAREGIAO",codigo_tipo_regiao:retorno[i].codigo_tipo_regiao,idtema:"metaregiao_"+retorno[i].codigo_tipo_regiao},node)}node.loadComplete()};i3GEO.php.listaTipoRegiao(monta)},listaMapasCadastrados:function(){var monta=function(retorno){var node,nraiz,i,html,tema;retorno=retorno.data.mapas;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmapacadastrado","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"mapaCadastrado","tid":"mapaCadastrado_"+retorno[i].ID_MAPA,"nome":retorno[i].NOME},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({id_mapaCadastrado:retorno[i].ID_MAPA,html:html,expanded:false,enableHighlight:true},node)}node.loadComplete()};i3GEO.php.pegaMapas(monta)},listaVariaveisMetaestat:function(){var monta=function(retorno){var node,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwmsmetaestat","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){html="<span title='"+retorno[i].descricao+"'> "+retorno[i].nome;html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({codigo_variavel:retorno[i].codigo_variavel,html:html,expanded:false,enableHighlight:true},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMedidasVariavel,1)}node.loadComplete()};i3GEO.php.listaVariavel(monta)},listaMedidasVariavel:function(node){var monta=function(retorno){var tema,html,i,n;n=retorno.length;for(i=0;i<n;i++){tema={"nameInput":"metaestat","id_medida_variavel":retorno[i].id_medida_variavel,"tid":"metaestat_"+retorno[i].id_medida_variavel,"nome":retorno[i].nomemedida},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,enableHighlight:true,tipoa_tema:"META",idtema:"metaestat_"+retorno[i].id_medida_variavel,id_medida_variavel:retorno[i].id_medida_variavel},node)}node.loadComplete()};i3GEO.php.listaMedidaVariavel(node.data.codigo_variavel,monta)},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer,node.data.tipo_ws)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor,link){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\","+"\"\","+"\"\","+"this.checked)";html+="onclick='javascript:"+adiciona+"' "+" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >";if(link){html+="<a href='"+link+"' target=_blank >"+layer+" - "+titulo+"</a>"}else{html+=layer+" - "+titulo}"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data.drives;if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:true},node)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){if($i(i3GEO.arvoreDeTemas.IDHTML)){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)}},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'>&nbsp;"+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' >&nbsp;&nbsp;&nbsp;&nbsp;</a></span></td>"+"<td>"+"<div><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' style=width:112px; value='' /></div>"+"</td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table>&nbsp;";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+"&nbsp;<br>",isLeaf:true,enableHighlight:true,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin' target=blank >"+$trad("x8")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin/html/arvore.html' target=blank >"+$trad("x9")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='"+$trad("x7")+"' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >"+$trad("x10")+"</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIINDIBR===true){var temp=function(){i3GEOF.vinde.inicia("",i3GEO.arvoreDeTemas.ARVORE)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/index.js",temp,"i3GEOF.vinde_script")}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;OGC-WMS</b></span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>"+editor,idwms:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIREGIOES===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;"+$trad("x87")+"</b></span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>",idregioes:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaRegioes,1)}if(i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;"+$trad("x57")+"</b></span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=112' >&nbsp;&nbsp;&nbsp;</a>",idwmsmetaestat:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaVariaveisMetaestat,1)}if(i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;"+$trad("x90")+"</b></span>",idmapacadastrado:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMapasCadastrados,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<span style='position:relative;top:-2px;' ><b>&nbsp;"+$trad("t46")+"</b></span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:true,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b>&nbsp;<span style='position:relative;top:-2px;' title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b>&nbsp;<span title='nao publicado' style='color:red'>"+dados[i].nomemenu+"</span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:true,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>"+$trad("a11")+"</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;if(sis.length>0){do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<span style='color:red'>"+sis[ig].NOME+"</span>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','"+$trad("a11")+"')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(drives,arvore){var temp=function(){var iglt,ig,drive,tempNode;if(!drives){drives=i3GEO.arvoreDeTemas.DRIVES}if(!arvore){arvore=i3GEO.arvoreDeTemas.ARVORE}if(drives==undefined||drives==""||drives.length===0){arvore.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:"&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:true,expanded:false},arvore.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({listaShp:true,listaImg:true,listaFig:false,html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:true,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);arvore.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' style='color:red'>"+grupos[i].nome+"</span>"}}d={html:"<span style='position:relative;top:-2px;'>"+grupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=true;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' style='color:red'>"+subgrupos[i].nome+"</span>"}}d={html:"<span style='position:relative;top:-2px;'>"+subgrupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=true}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' style='color:red' >"+temas[i].nome+"</span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,tipoa_tema:temas[i].tipoa_tema,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos,funcaoClick="i3GEO.util.adicionaSHP";dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false,listaImg:node.data.listaImg,listaFig:node.data.listaFig,listaShp:node.data.listaShp,funcaoClick:funcaoClick},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if((node.data.listaFig===true&&(conteudo.search(".png")>1||conteudo.search(".jpg")>1||conteudo.search(".PNG")>1))||(node.data.listaImg===true&&(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1))||(node.data.listaShp===true&&(conteudo.search(".shp")>1||conteudo.search(".SHP")>1))){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='"+funcaoClick+"(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";if(retorno.data.urls&&retorno.data.urls[ig]!=""){}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,clique;html="<td class='ygtvcontent' style='text-align:left;'>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='position:relative;top:3px;width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img style='position:relative;top:3px;' title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}html+=clique;if(tema.nameInput){html+=" name='"+tema.nameInput+"' "}if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="<span title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='left:4px;cursor:pointer;text-align:left;color:"+cor+";padding-left:0px;position:relative;top:1px;' "+clique+">";html+=tema.nome;html+="</span></td>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}if(OPCOESADICIONAIS.metaestat===true){ins+="<td><img "+estilo("iconeMetaestat")+" onclick='i3GEO.mapa.dialogo.metaestat()' title='Cartogramas estatisticos'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var exec,tempAdiciona=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length>0){exec=function(tsl){var no,p,funcao;if(i3GEO.arvoreDeTemas.ARVORE){no=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idtema",tsl[0]);if(no&&no.data.tipoa_tema==="META"){if(no.data.id_medida_variavel!=undefined&&no.data.id_medida_variavel!=""){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+no.data.id_medida_variavel+")")}else{p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=pegaMetadadosMapfile"+"&idtema="+no.data.idtema+"&g_sid="+i3GEO.configura.sid;funcao=function(retorno){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+retorno.data.id_medida_variavel+")")};cpJSON.call(p,"foo",funcao)}}else if(no&&no.data.tipoa_tema==="METAREGIAO"){p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao"+"&codigo_tipo_regiao="+no.data.codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;funcao=function(){i3GEO.atualiza()};cpJSON.call(p,"foo",funcao)}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}};if(i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){i3GEO.janela.confirma($trad("x76"),300,$trad("x14"),$trad("x15"),function(){exec(tsl)})}else{exec.call(this,tsl)}}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>";return retorno.data};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig++){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conex&atilde;o com servi&ccedil;os</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&atilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},vinde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/index.js","i3GEOF.vinde.criaJanelaFlutuante()","i3GEOF.vinde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","",$trad("x44"))},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","",$trad("x45"))},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","",$trad("a4")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' >&nbsp;&nbsp;&nbsp;</a>")},conectarwmst:function(){i3GEO.janela.cria("600px","400px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","",$trad("x46")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' >&nbsp;&nbsp;&nbsp;</a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","",$trad("x47")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' >&nbsp;&nbsp;&nbsp;</a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var i=parseInt(Math.random()*100,10),janelaeditor=i3GEO.janela.cria(w,h,s,i,10,s,"janela"+i,false),wdocaiframe="";wdocaiframe=$i("janela"+i+"i");if(wdocaiframe){wdocaiframe.style.width="100%";wdocaiframe.style.height="100%"}YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}};
377   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:12,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,imprimir:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.textAlign="center";if(i3GEO.barraDeBotoes.POSICAO==="top"){temp.style.top="25px"}temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(){var temp=function(){var cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("janelaEditorLimites")};i3GEO.janela.cria("300px","100px","","","","Editor","janelaEditorLimites",false,"hd",cabecalho,minimiza);$i("janelaEditorLimites_corpo").style.backgroundColor="white";i3GEOF.editorlimites.inicia("janelaEditorLimites_corpo");i3GEOF.locregiao.iniciaJanelaFlutuante();YAHOO.i3GEO.janela.manager.find("i3GEOF.locregiao").moveTo(100,40)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/metaestat/editorlimites_dependencias.php",temp,"editorlimites_dependencias.php",true)}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};i3GEO.desenho.openlayers.criaLayerGrafico();if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}};
  377 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir:true,google:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.textAlign="center";if(i3GEO.barraDeBotoes.POSICAO==="top"){temp.style.top="25px"}temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(){var temp=function(){var cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("janelaEditorLimites")};i3GEO.janela.cria("300px","100px","","","","Editor","janelaEditorLimites",false,"hd",cabecalho,minimiza);$i("janelaEditorLimites_corpo").style.backgroundColor="white";i3GEOF.editorlimites.inicia("janelaEditorLimites_corpo");i3GEOF.locregiao.iniciaJanelaFlutuante();YAHOO.i3GEO.janela.manager.find("i3GEOF.locregiao").moveTo(100,40)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/metaestat/editorlimites_dependencias.php",temp,"editorlimites_dependencias.php",true)}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}};
378 378 function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};
379 379 function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
380 380 function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left+"px";vml.style.top=top+"px";vml.style.width=width+"px";vml.style.height=height+"px";if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left+"px";shape.style.marginTop=top+"px"}else{shape.style.left=left+"px";shape.style.top=top+"px"}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10+"px";tracker.style.top=box.y-10+"px";tracker.style.width=box.width+20+"px";tracker.style.height=box.height+20+"px";tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
... ...
classesjs/i3geo_tudo_compacto6.js.php
... ... @@ -356,16 +356,16 @@ BalloonConfig=function(balloon,set){set=set||&#39;&#39;;if(!balloon.configured||set==&#39;GB
356 356 var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width+"px";this.height=height+"px";this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&amp;/g,'&amp;amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];var adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1};
357 357 i3GEOF=[];YAHOO.namespace("i3GEO");var i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaMobile()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);exit}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=YAHOO.lang.JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.configura.guardaExtensao=false}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltimaExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp){temp=temp.replace(/[\+]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);exit}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
358 358 if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},listaTodasChaves:function(obj){var keys,key="";keys=[];for(key in obj){keys.push(key)}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,criaNo;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=true}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=true;criaNo=function(obj,noDestino){var trad,i,j,linha,conteudo,temaNode,c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){trad=$trad(linha.text);if(!trad){trad=linha.text}conteudo="<a href='#' onclick='"+linha.url+"'>"+trad+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,noDestino,false,true);temaNode.enableHighlight=false;if(obj.propriedades[i].propriedades){criaNo(obj.propriedades[i],temaNode)}}};criaNo(obj,tempNode);arvore.collapseAll();arvore.draw();return arvore},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;novoel.id=id;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<span class=digitar onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' ><input onchange=\""+onch+"\" tabindex='0' onclick='javascript:this.select();' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' /></span>"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci,w,h){if(!w){w=5}if(!h){h=5}if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-(h/2))+"px";i.left=(xi-(w/2))+"px";i.width=w+"px";i.height=h+"px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width=w+"px";temp.height=h+"px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.Panel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},getScrollHeight:function(){var mx=Math.max,d=document;return mx(mx(d.body.scrollHeight,d.documentElement.scrollHeight),mx(d.body.offsetHeight,d.documentElement.offsetHeight),mx(d.body.clientHeight,d.documentElement.clientHeight))},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;try{for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[2]&&t[2]=="dicionario_script"){return false}if(t[0]===texto){return true}}return false}catch(e){return false}},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo,estilo,yui){if(onde&&onde!==""){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(!nome){nome=""}if(!multiplo){multiplo=false}if(!estilo||estilo==""){estilo="font-size: 12px;width: 95%;"}if(!yui){yui=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas='',n,nome="";if(yui===true){comboTemas='<input type="button" name='+id+'_button id="'+id+'" value="'+$trad("x33")+'&nbsp;&nbsp;">';id=id+"select";nome=id}if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas+="<select style='"+estilo+"' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas+="<select style='"+estilo+"' id='"+id+"' name='"+nome+"'>"}if(yui===false){comboTemas+="<option value=''>----</option>"}for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="locais"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="editavel"){temp=i3GEO.arvoreDeCamadas.filtraCamadas("editavel","SIM","igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(temp)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}},checkCombo:function(id,nomes,valores,estilo,funcaoclick,ids,idschecked){var temp,i,combo="",n=valores.length;if(n>0){combo="<div style='"+estilo+"'><table class=lista3 id="+id+" >";for(i=0;i<n;i++){temp="";if(idschecked&&idschecked[i]){temp="checked"}if(!ids){combo+="<tr><td><input "+temp+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}else{combo+="<tr><td><input "+temp+" id="+ids[i]+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}}combo+="</table></div>"}return combo},valoresCheckCombo:function(id){var el=$i(id),res=[],n,i;if(el){el=el.getElementsByTagName("input");n=el.length;for(i=0;i<n;i++){if(el[i].checked===true){res.push(el[i].value)}}}return res},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left;width:"+size+" cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome,alias){if(!alias){alias="sim"}if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i,nm;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){if(alias=="sim"){nm=retorno.data.valores[i].alias;if(nm===""){nm=retorno.data.valores[i].item}}else{nm=retorno.data.valores[i].item}ins.push("<option value='"+retorno.data.valores[i].item+"' >"+nm+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo,ordenacao){if(!ordenacao||ordenacao==""){ordenacao=="nao"}if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >"+$trad("x65")+"</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){if(ordenacao==="sim"){ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td>Ordem</td>")}else{ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td></td>")}n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left;cursor:text;width:"+size+"' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text value='"+retorno.data.valores[i].item+"' /></td>");if(ordenacao==="sim"){ins.push("<td><input style='text-align:left; cursor:text;' id='ordem_"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='3' value='"+i+"' /></td>")}else{ins.push("<td></td>")}ins.push("</tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >'+$trad("x66")+'</div>',tipo:"erro"}}funcao.call(this,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var c="checked",ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");n=retorno.data.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' "+c+" name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");c="";ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},comboEpsg:function(idCombo,onde,funcaoOnChange,valorDefault){onde=$i(onde);onde.innerHTML="<span style=color:red;font-size:10px; >buscando...</span>";var monta=function(retorno){var ins=[],i,n;if(retorno.data!==undefined){n=retorno.data.length;ins.push("<select id='"+idCombo+"' onChange='"+funcaoOnChange+"(this)' >");for(i=0;i<n;i++){ins.push("<option value='"+retorno.data[i].codigo+"'>"+retorno.data[i].nome+"</option>")}ins.push("</select>");ins=ins.join('');onde.innerHTML=ins;$i(idCombo).value=valorDefault}else{onde.innerHTML='<div class=erro >Ocorreu um erro</div>'}};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container,mantem,onde){var temp=$i(idatual),botoes="",ndiv=document.createElement("div"),nids,i,fundo;if(!mantem){mantem=false}if(temp&&mantem==false){$i(container).removeChild(temp)}fundo="#F2F2F2";$i(container).style.backgroundColor="white";botoes="<table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){botoes+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){botoes+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}botoes+="</tr></table>";var ativaBotoes=function(anterior,proxima,idatual){var i;new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}};if(onde){$i(onde).innerHTML=botoes}else{texto=texto+"<br><br>"+botoes}if(!document.getElementById(idatual)){ndiv.id=idatual;ndiv.innerHTML=texto;$i(container).appendChild(ndiv)}ativaBotoes(anterior,proxima,idatual);temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome,nomejs,nomefuncao){if(!nomejs){nomejs="index.js"}if(!nomefuncao){nomefuncao="i3GEOF."+nome+".criaJanelaFlutuante();"}var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/"+nomejs;if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde("i3GEOF."+nome+"_script"+"aguarde","Carregando JS");i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}else{i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,temp,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento+"&locaplic="+i3GEO.configura.locaplic,nx="",texto="",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";if(i3GEO&&i3GEO.arvoreDeCamadas){ins+="<div id='i3geo_janelaCorRampComboCabeca' class='comboTemasCabecalho' style='top:0px;'> ------</div>"}ins+="&nbsp;&nbsp;&nbsp;"+texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="380px";wdocaiframe.style.width="100%";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.Panel(id,{height:"430px",modal:false,width:"280px",fixedcenter:fix,constraintoviewport:true,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe;if($i("i3geo_janelaCorRampComboCabeca")){temp=function(){var p,tema=$i("i3geo_janelaCorRampComboCabecaSel").value,funcao=function(retorno){parent.frames["i3geo_janelaCorRampi"].document.getElementById("ncores").value=retorno.data.length};if(tema!==""){i3GEO.mapa.ativaTema(tema);p=i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=editalegenda&opcao=edita&tema="+tema;i3GEO.util.ajaxGet(p,funcao);cp=new cpaint()}};i3GEO.janela.comboCabecalhoTemas("i3geo_janelaCorRampComboCabeca","i3geo_janelaCorRampComboCabecaSel","none","ligados",temp)}},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectTierTablet");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},detectaMobile:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret},ajaxGet:function(sUrl,funcaoRetorno){sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');re=new RegExp("%3A","g");sUrl=sUrl.replace(re,':');var falhou=function(e){},callback={success:function(o){try{funcaoRetorno.call("",YAHOO.lang.JSON.parse(o.responseText))}catch(e){falhou(e)}},failure:falhou,argument:{foo:"foo",bar:"bar"}};YAHOO.util.Connect.asyncRequest("GET",sUrl,callback)},verifica_html5_storage:function(){if(typeof(Storage)!=="undefined"){return true}else{return false}},pegaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){return window.localStorage[item]}else{return false}},limpaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){window.localStorage.clear(item)}},gravaDadosLocal:function(item,valor){if(i3GEO.util.verifica_html5_storage()){window.localStorage[item]=valor;return true}else{return false}},extGeo2OSM:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1<=180&&temp[0]*1>=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(projWGS84,proj900913);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(projWGS84,proj900913);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},extOSM2Geo:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1>=180||temp[0]*1<=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(proj900913,projWGS84);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(proj900913,projWGS84);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},navegadorDir:function(obj,listaShp,listaImg,listaFig){if(!obj){listaShp=true;listaImg=true;listaFig=true}var temp=function(){i3GEOF.navegarquivos.iniciaDicionario(obj,listaShp,listaImg,listaFig)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorDir()","navegarquivos","navegarquivos","index.js",temp)},navegadorPostgis:function(obj,conexao,tipo){if(!obj){conexao=""}if(!tipo){tipo="sql"}var temp=function(){i3GEOF.navegapostgis.iniciaDicionario(obj,conexao,tipo)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorPostgis()","navegapostgis","navegapostgis","index.js",temp)},base64encode:function(str){var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i<len){c1=str.charCodeAt(i++)&0xff;if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break}c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break}c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F)}return out},base64decode:function(str){var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i<len){do{c1=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c1==-1);if(c1==-1)break;do{c2=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c2==-1);if(c2==-1)break;out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3]}while(i<len&&c3==-1);if(c3==-1)break;out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4]}while(i<len&&c4==-1);if(c4==-1)break;out+=String.fromCharCode(((c3&0x03)<<6)|c4)}return out}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};
359   -g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:""}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"N&atilde;o imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opci&oacute;n de impresi&oacute;n del mapa",it:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Anima&ccedil;&atilde;o",en:"Animation",es:"Animaci&oacute;n",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Propriet"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usu&aacute;rio",en:"User manual",es:"Manual de usuario",it:"Manual do usu&aacute;rio"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico Brazil",es:"Software p&uacute;blico Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de pol&iacute;gonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grat&iacute;la de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grat&iacute;la de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Points distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Pol&iacute;gonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro m&eacute;dio",en:"Middle center",es:"Centro medio",it:"Centro m&eacute;dio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aqu&iacute; &oacute; haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:""}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:""}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non conosciuta"}],"t12":[{pt:"Excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transpar&ecirc;ncia do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a altera&ccedil;&atilde;o da forma de representa&ccedil;&atilde;o desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gr&aacute;fico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t37a":[{pt:"Tema com gr&aacute;ficos",en:"Theme with chart",es:"Tema con Gr&aacute;fico",it:"Grafico"}],"t37b":[{pt:"Gr&aacute;fico interativo",en:"Interactive chart",es:"Gr&aacute;fico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padr&atilde;o SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para est&aacute;ndar SLD.",it:"Exporta a legenda para o padr&atilde;o SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa ser&aacute; actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa tem&aacute;tico 3D",en:"Thematic map 3D",es:"Mapa tem&aacute;tico 3D",it:"Mapa tem&aacute;tico 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"Code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conex&otilde;es",en:"Conections",es:"Conexiones",it:"Conex&otilde;es"}],"a16":[{pt:"Servi&ccedil;os",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Cat&aacute;logo",en:"Catalog",es:"Cat&aacute;logo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida",en:"Quick search",es:"B&uacute;squeda r&aacute;pida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"Dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a a la regi&oacute;n indicada con un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la regi&oacute;n visible en el mapa. Despu&eacute;s de activada, haga clic y arrastre el rat&oacute;n sobre el mapa para mover la regi&oacute;n visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"Clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarse, detenga el rat&oacute;n por un momento en el punto deseado o haga click en &eacute;l.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensi&oacute;n geogr&aacute;fica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"Extens&atilde;o atual",en:"Actual extent",es:"Extensi&oacute; actual",it:"extens&atilde;o atual"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"mapa de refer&ecirc;ncia"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikip&eacute;dia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikip&eacute;dia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"conflu&ecirc;ncias",en:"Confluences",es:"Confluencias",it:"conflu&ecirc;ncias"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura la distanza tra due o pi punti cliccati sulla mappa (minore distanza). Il calcolo della distanza approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"dist&acirc;ncia",en:"distance",es:"distancia",it:"distncia"}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el &aacute;rea de un pol&iacute;gono dibujado sobre la pantalla. El c&aacute;lculo del &aacute;rea es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"&aacute;rea",en:"area",es:"&aacute;rea",it:"&aacute;rea"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema seleccionado. El tema debe tener campos con valores num&eacute;ricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como &aacute;reas de influencia o selecci&oacute;n por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os bot&otilde;es e outras caracter&iacute;sticas visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Esta&ccedil;&otilde;es METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Esta&ccedil;&otilde;es metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"L&iacute;nea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"N&atilde;o existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"N&atilde;o existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navega&ccedil;&atilde;o com o mouse",en:"Mouse navigation",es:"Navegaci&oacute;n con el rat&oacute;n",it:"Navega&ccedil;&atilde;o com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"Mapa de refer&ecirc;ncia"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atm&oacute;sfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites pol&iacute;ticos",en:"Political boundaries",es:"L&iacute;mites pol&iacute;ticos",it:"Limites pol&iacute;ticos"}],"ge9":[{pt:"Constru&ccedil;&otilde;es em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Constru&ccedil;&otilde;es em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"P&aacute;gina principal",en:"Home",es:"Inicio",it:"P&aacute;gina principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de men&uacute;s",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores",en:"option visible only for editors",es:"opci&oacute;n visible solo para editores",it:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores"}],"x8":[{pt:"Sistema de administra&ccedil;&atilde;o",en:"Admin. System",es:"Sistema de administraci&oacute;n",it:"Sistema de administra&ccedil;&atilde;o"}],"x9":[{pt:"Editar &aacute;rvore",en:"Edit tree",es:"Editar &aacute;rbol",it:"Editar &aacute;rvore"}],"x10":[{pt:"Editar menus do cat&aacute;logo",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas n&atilde;o encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas n&atilde;o encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"n&atilde;o",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor n&atilde;o definido",en:"Value not set",es:"Valor no establecido",it:"Valor n&atilde;o definido"}],"x17":[{pt:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa",en:"This option only affects the printing of the map",es:"Esta opci&oacute;n s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa"}],"x18":[{pt:"Nome n&atilde;o definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Coment&aacute;rios de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o pol&iacute;gono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el pol&iacute;gono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa opera&ccedil;&atilde;o n&atilde;o funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operaci&oacute;n no funciona en esta interfaz",it:""}],"x22":[{pt:"Op&ccedil;&atilde;o n&atilde;o dispon&iacute;vel",en:"Option not available",es:"Opci&oacute;n no disponible",it:"Opcin no disponible"}],"x23":[{pt:"Dire&ccedil;&atilde;o",en:"",es:"Direcci&oacute;n",it:"Direction"}],"x25":[{pt:"M&eacute;todo para calcular dist&acirc;ncias",en:"Method to calculate distances",es:"M&eacute;todo para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"Realmente desea salir?",it:""}],"x27":[{pt:"Usu&aacute;rio",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contrase&ntilde;a",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Recuperar senha",en:"Send password",es:"Enviar la contrasena",it:""}],"x33":[{pt:"Escolha um tema da lista",en:"",es:"",it:""}],"x34":[{pt:"Lugar",en:"",es:"",it:""}],"x35":[{pt:"Escolha um tipo de busca nas propriedades",en:"",es:"",it:""}],"x36":[{pt:"Digite uma palavra para busca!",en:"",es:"",it:""}],"x37":[{pt:"Onde ser&aacute; feita a busca",en:"",es:"",it:""}],"x38":[{pt:"Servi&ccedil;os de busca externos",en:"",es:"",it:""}],"x39":[{pt:"Temas existentes no mapa",en:"",es:"",it:""}],"x40":[{pt:"Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber opera&ccedil;&otilde;es de busca",en:"",es:"",it:""}],"x41":[{pt:"Nada encontrado nos temas ou nenhum tema permite busca",en:"",es:"",it:""}],"x42":[{pt:"Nada encontrado em ",en:"",es:"",it:""}],"x43":[{pt:"Erro ao acessar o servi&ccedil;o",en:"",es:"",it:""}],"x44":[{pt:"Nuvem Flash",en:"",es:"",it:""}],"x45":[{pt:"Diret&oacute;rios",en:"",es:"",it:""}],"x46":[{pt:"Conex&atilde;o WMS-T",en:"",es:"",it:""}],"x47":[{pt:"Conex&atilde;o GeoRSS",en:"",es:"",it:""}],"x48":[{pt:"Rota",en:"",es:"",it:""}],"x49":[{pt:"Coordenadas aproximadas",en:"",es:"",it:""}],"x50":[{pt:"Feche para parar",en:"",es:"",it:""}],"x51":[{pt:"Sele&ccedil;&atilde;o",en:"",es:"",it:""}],"x52":[{pt:"Alterar senha",en:"",es:"",it:""}],"x53":[{pt:"Upload de WMC",en:"",es:"",it:""}],"x54":[{pt:"Perfil",en:"",es:"",it:""}],"x55":[{pt:"Salva o tema",en:"",es:"",it:""}],"x56":[{pt:"Topon&iacute;mia",en:"",es:"",it:""}],"x57":[{pt:"Cartogramas estat&iacute;sticos",en:"",es:"",it:""}],"x58":[{pt:"Continua",en:"",es:"",it:""}],"x59":[{pt:"Localiza limite",en:"",es:"",it:""}],"x60":[{pt:"Cartogramas",en:"",es:"",it:""}],"x61":[{pt:"Filtra limite",en:"",es:"",it:""}],"x62":[{pt:"Remover",en:"",es:"",it:""}],"x63":[{pt:"Para salvar as configura&ccedil;&otilde;es de uma camada,<br> utilize a op&ccedil;&atilde;o existente na &aacute;rvore de camadas no n&oacute; correspondente ao tema (basta expandir o tema para visualizar as op&ccedil;&otilde;es)<br><br>",en:"",es:"",it:""}],"x64a":[{pt:"Congela a vis&atilde;o atual",en:"",es:"",it:""}],"x64":[{pt:"Item",en:"",es:"",it:""}],"x65":[{pt:"Buscando itens...",en:"",es:"",it:""}],"x66":[{pt:"Ocorreu um erro",en:"",es:"",it:""}],"x67":[{pt:"Comunidade i3Geo",en:"",es:"",it:""}],"x68":[{pt:"Vers&atilde;o",en:"",es:"",it:""}],"x69":[{pt:"Pressione a tecla CTRL junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"",es:"",it:""}],"x70":[{pt:"Utilize os dedos em um movimento de pin&ccedil;a para definir a &aacute;rea que ser&aacute; aproximada ou afastada",en:"",es:"",it:""}],"x71":[{pt:"Aplicativos estat&iacute;sticos cadastrados",en:"",es:"",it:""}],"x72":[{pt:"Lista de mapas cadastrados",en:"",es:"",it:""}],"x73":[{pt:"Direciona para a versao adaptada para dispositivos moveis?",en:"",es:"",it:""}],"x74":[{pt:"Fecha",en:"Close",es:"",it:""}],"x75":[{pt:"Cancela",en:"Cancel",es:"",it:""}],"x76":[{pt:"O tema j&aacute;existe no mapa. Adiciona novamente?",en:"",es:"",it:""}],"x77":[{pt:"Nome do novo marcador",en:"",es:"",it:""}],"x78":[{pt:"Copie os marcadores e cole em um editor para guard&aacute;-los",en:"",es:"",it:""}],"x79":[{pt:"Marcadores",en:"Bookmarks",es:"Marcadores",it:""}],"x80":[{pt:"Exportar",en:"Export",es:"Exportar",it:""}],"x81":[{pt:"Importar",en:"Import",es:"Importar",it:""}],"x82":[{pt:"Marcar regi&atilde;o",en:"",es:"",it:""}],"x83":[{pt:"Cole os marcadores para import&aacute;-los",en:"",es:"",it:""}],"x84":[{pt:"Exportar SHP",en:"",es:"",it:""}],"x85":[{pt:"Visualizador de WMS da INDE-Br",en:"",es:"",it:""}],"x86":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x87":[{pt:"Limites e localidades",en:"",es:"",it:""}],"x88":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x89":[{pt:"Editar cadastro",en:"",es:"",it:""}],"x90":[{pt:"Mapas cadastrados",en:"",es:"",it:""}],"x91":[{pt:"Feche para parar. Desligue o tema para ver o efeito",en:"",es:"",it:""}],"x92":[{pt:"Escolha uma camada",en:"",es:"",it:""}],"x93":[{pt:"Localiza&ccedil;&atilde;o do usu&aacute;rio",en:"",es:"",it:""}]};
  359 +g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:""}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"N&atilde;o imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opci&oacute;n de impresi&oacute;n del mapa",it:"Ativa ou desativa a legenda de um tema na op&ccedil;&atilde;o de impress&atilde;o do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Anima&ccedil;&atilde;o",en:"Animation",es:"Animaci&oacute;n",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Propriet"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usu&aacute;rio",en:"User manual",es:"Manual de usuario",it:"Manual do usu&aacute;rio"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico Brazil",es:"Software p&uacute;blico Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de pol&iacute;gonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grat&iacute;la de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grat&iacute;la de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Points distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grat&iacute;la",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Pol&iacute;gonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro m&eacute;dio",en:"Middle center",es:"Centro medio",it:"Centro m&eacute;dio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aqu&iacute; &oacute; haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:""}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:""}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non conosciuta"}],"t12":[{pt:"Excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transpar&ecirc;ncia do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a altera&ccedil;&atilde;o da forma de representa&ccedil;&atilde;o desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gr&aacute;fico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t37a":[{pt:"Tema com gr&aacute;ficos",en:"Theme with chart",es:"Tema con Gr&aacute;fico",it:"Grafico"}],"t37b":[{pt:"Gr&aacute;fico interativo",en:"Interactive chart",es:"Gr&aacute;fico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padr&atilde;o SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para est&aacute;ndar SLD.",it:"Exporta a legenda para o padr&atilde;o SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa ser&aacute; actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos ap&oacute;s o qual a camada ser&aacute; atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa tem&aacute;tico 3D",en:"Thematic map 3D",es:"Mapa tem&aacute;tico 3D",it:"Mapa tem&aacute;tico 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou n&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"Code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conex&otilde;es",en:"Conections",es:"Conexiones",it:"Conex&otilde;es"}],"a16":[{pt:"Servi&ccedil;os",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Cat&aacute;logo",en:"Catalog",es:"Cat&aacute;logo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida",en:"Quick search",es:"B&uacute;squeda r&aacute;pida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"Dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a a la regi&oacute;n indicada con un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la regi&oacute;n visible en el mapa. Despu&eacute;s de activada, haga clic y arrastre el rat&oacute;n sobre el mapa para mover la regi&oacute;n visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"Clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarse, detenga el rat&oacute;n por un momento en el punto deseado o haga click en &eacute;l.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensi&oacute;n geogr&aacute;fica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"Extens&atilde;o atual",en:"Actual extent",es:"Extensi&oacute; actual",it:"extens&atilde;o atual"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"mapa de refer&ecirc;ncia"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikip&eacute;dia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikip&eacute;dia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"conflu&ecirc;ncias",en:"Confluences",es:"Confluencias",it:"conflu&ecirc;ncias"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura la distanza tra due o pi punti cliccati sulla mappa (minore distanza). Il calcolo della distanza approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"dist&acirc;ncia",en:"distance",es:"distancia",it:"distncia"}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el &aacute;rea de un pol&iacute;gono dibujado sobre la pantalla. El c&aacute;lculo del &aacute;rea es aproximado y su precisi&oacute;n depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"&aacute;rea",en:"area",es:"&aacute;rea",it:"&aacute;rea"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema seleccionado. El tema debe tener campos con valores num&eacute;ricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como &aacute;reas de influencia o selecci&oacute;n por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os bot&otilde;es e outras caracter&iacute;sticas visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Esta&ccedil;&otilde;es METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Esta&ccedil;&otilde;es metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"L&iacute;nea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"N&atilde;o existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"N&atilde;o existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navega&ccedil;&atilde;o com o mouse",en:"Mouse navigation",es:"Navegaci&oacute;n con el rat&oacute;n",it:"Navega&ccedil;&atilde;o com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de refer&ecirc;ncia",en:"Reference map",es:"Mapa de referencia",it:"Mapa de refer&ecirc;ncia"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atm&oacute;sfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites pol&iacute;ticos",en:"Political boundaries",es:"L&iacute;mites pol&iacute;ticos",it:"Limites pol&iacute;ticos"}],"ge9":[{pt:"Constru&ccedil;&otilde;es em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Constru&ccedil;&otilde;es em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"P&aacute;gina principal",en:"Home",es:"Inicio",it:"P&aacute;gina principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de men&uacute;s",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores",en:"option visible only for editors",es:"opci&oacute;n visible solo para editores",it:"op&ccedil;&atilde;o vis&iacute;vel apenas para editores"}],"x8":[{pt:"Sistema de administra&ccedil;&atilde;o",en:"Admin. System",es:"Sistema de administraci&oacute;n",it:"Sistema de administra&ccedil;&atilde;o"}],"x9":[{pt:"Editar &aacute;rvore",en:"Edit tree",es:"Editar &aacute;rbol",it:"Editar &aacute;rvore"}],"x10":[{pt:"Editar menus do cat&aacute;logo",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas n&atilde;o encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas n&atilde;o encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"n&atilde;o",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor n&atilde;o definido",en:"Value not set",es:"Valor no establecido",it:"Valor n&atilde;o definido"}],"x17":[{pt:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa",en:"This option only affects the printing of the map",es:"Esta opci&oacute;n s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa op&ccedil;&atilde;o afeta apenas a impress&atilde;o do mapa"}],"x18":[{pt:"Nome n&atilde;o definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Coment&aacute;rios de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o pol&iacute;gono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el pol&iacute;gono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa opera&ccedil;&atilde;o n&atilde;o funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operaci&oacute;n no funciona en esta interfaz",it:""}],"x22":[{pt:"Op&ccedil;&atilde;o n&atilde;o dispon&iacute;vel",en:"Option not available",es:"Opci&oacute;n no disponible",it:"Opcin no disponible"}],"x23":[{pt:"Dire&ccedil;&atilde;o",en:"",es:"Direcci&oacute;n",it:"Direction"}],"x25":[{pt:"M&eacute;todo para calcular dist&acirc;ncias",en:"Method to calculate distances",es:"M&eacute;todo para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"Realmente desea salir?",it:""}],"x27":[{pt:"Usu&aacute;rio",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contrase&ntilde;a",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Recuperar senha",en:"Send password",es:"Enviar la contrasena",it:""}],"x33":[{pt:"Escolha um tema da lista",en:"",es:"",it:""}],"x34":[{pt:"Lugar",en:"",es:"",it:""}],"x35":[{pt:"Escolha um tipo de busca nas propriedades",en:"",es:"",it:""}],"x36":[{pt:"Digite uma palavra para busca!",en:"",es:"",it:""}],"x37":[{pt:"Onde ser&aacute; feita a busca",en:"",es:"",it:""}],"x38":[{pt:"Servi&ccedil;os de busca externos",en:"",es:"",it:""}],"x39":[{pt:"Temas existentes no mapa",en:"",es:"",it:""}],"x40":[{pt:"Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber opera&ccedil;&otilde;es de busca",en:"",es:"",it:""}],"x41":[{pt:"Nada encontrado nos temas ou nenhum tema permite busca",en:"",es:"",it:""}],"x42":[{pt:"Nada encontrado em ",en:"",es:"",it:""}],"x43":[{pt:"Erro ao acessar o servi&ccedil;o",en:"",es:"",it:""}],"x44":[{pt:"Nuvem Flash",en:"",es:"",it:""}],"x45":[{pt:"Diret&oacute;rios",en:"",es:"",it:""}],"x46":[{pt:"Conex&atilde;o WMS-T",en:"",es:"",it:""}],"x47":[{pt:"Conex&atilde;o GeoRSS",en:"",es:"",it:""}],"x48":[{pt:"Rota",en:"",es:"",it:""}],"x49":[{pt:"Coordenadas aproximadas",en:"",es:"",it:""}],"x50":[{pt:"Feche para parar",en:"",es:"",it:""}],"x51":[{pt:"Sele&ccedil;&atilde;o",en:"",es:"",it:""}],"x52":[{pt:"Alterar senha",en:"",es:"",it:""}],"x53":[{pt:"Upload de WMC",en:"",es:"",it:""}],"x54":[{pt:"Perfil",en:"",es:"",it:""}],"x55":[{pt:"Salva o tema",en:"",es:"",it:""}],"x56":[{pt:"Topon&iacute;mia",en:"",es:"",it:""}],"x57":[{pt:"Cartogramas estat&iacute;sticos",en:"",es:"",it:""}],"x58":[{pt:"Continua",en:"",es:"",it:""}],"x59":[{pt:"Localiza limite",en:"",es:"",it:""}],"x60":[{pt:"Cartogramas",en:"",es:"",it:""}],"x61":[{pt:"Filtra limite",en:"",es:"",it:""}],"x62":[{pt:"Remover",en:"",es:"",it:""}],"x63":[{pt:"Para salvar as configura&ccedil;&otilde;es de uma camada,<br> utilize a op&ccedil;&atilde;o existente na &aacute;rvore de camadas no n&oacute; correspondente ao tema (basta expandir o tema para visualizar as op&ccedil;&otilde;es)<br><br>",en:"",es:"",it:""}],"x64a":[{pt:"Congela a vis&atilde;o atual",en:"",es:"",it:""}],"x64":[{pt:"Item",en:"",es:"",it:""}],"x65":[{pt:"Buscando itens...",en:"",es:"",it:""}],"x66":[{pt:"Ocorreu um erro",en:"",es:"",it:""}],"x67":[{pt:"Comunidade i3Geo",en:"",es:"",it:""}],"x68":[{pt:"Vers&atilde;o",en:"",es:"",it:""}],"x69":[{pt:"Pressione a tecla CTRL junto com o bot&atilde;o esquerdo do mouse e arraste para definir a &aacute;rea que ser&aacute; aproximada",en:"",es:"",it:""}],"x70":[{pt:"Utilize os dedos em um movimento de pin&ccedil;a para definir a &aacute;rea que ser&aacute; aproximada ou afastada",en:"",es:"",it:""}],"x71":[{pt:"Aplicativos estat&iacute;sticos cadastrados",en:"",es:"",it:""}],"x72":[{pt:"Lista de mapas cadastrados",en:"",es:"",it:""}],"x73":[{pt:"Direciona para a versao adaptada para dispositivos moveis?",en:"",es:"",it:""}],"x74":[{pt:"Fecha",en:"Close",es:"",it:""}],"x75":[{pt:"Cancela",en:"Cancel",es:"",it:""}],"x76":[{pt:"O tema j&aacute;existe no mapa. Adiciona novamente?",en:"",es:"",it:""}],"x77":[{pt:"Nome do novo marcador",en:"",es:"",it:""}],"x78":[{pt:"Copie os marcadores e cole em um editor para guard&aacute;-los",en:"",es:"",it:""}],"x79":[{pt:"Marcadores",en:"Bookmarks",es:"Marcadores",it:""}],"x80":[{pt:"Exportar",en:"Export",es:"Exportar",it:""}],"x81":[{pt:"Importar",en:"Import",es:"Importar",it:""}],"x82":[{pt:"Marcar regi&atilde;o",en:"",es:"",it:""}],"x83":[{pt:"Cole os marcadores para import&aacute;-los",en:"",es:"",it:""}],"x84":[{pt:"Exportar SHP",en:"",es:"",it:""}],"x85":[{pt:"Visualizador de WMS da INDE-Br",en:"",es:"",it:""}],"x86":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x87":[{pt:"Limites e localidades",en:"",es:"",it:""}],"x88":[{pt:"Prefer&ecirc;ncias",en:"",es:"",it:""}],"x89":[{pt:"Editar cadastro",en:"",es:"",it:""}],"x90":[{pt:"Mapas cadastrados",en:"",es:"",it:""}],"x91":[{pt:"Feche para parar. Desligue o tema para ver o efeito",en:"",es:"",it:""}],"x92":[{pt:"Escolha uma camada",en:"",es:"",it:""}],"x93":[{pt:"Localiza&ccedil;&atilde;o do usu&aacute;rio",en:"",es:"",it:""}],"x94":[{pt:"Remove as figuras",en:"",es:"",it:""}]};
360 360 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id,dic){if(!dic){dic=i3GEO.idioma.DICIONARIO}if(dic[id]){var r,t=dic[id][0];r=t[i3GEO.idioma.ATUAL];if(r==""){r=t["pt"]}return r}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};$trad=function(id,dic){if(!dic){dic=i3GEO.idioma.DICIONARIO}return(i3GEO.idioma.traduzir(id,dic))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){i3GEO.janela.tempoMsg("Problemas com idiomas "+e)}})();
361 361 if(typeof(i3GEO)==='undefined'){var i3GEO={}}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){i3GEO.janela.tempoMsg("i3GEO.php diz: variavel i3GEO.configura.locaplic n&atilde;o esta definida")}if(i3GEO.configura.sid===undefined){i3GEO.janela.tempoMsg("i3GEO.php diz: variavel i3GEO.configura.sid n&atilde;o esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/inserexy2/exec.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}cpJSON.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php","criaLegendaHTML",funcao,"funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){var p=i3GEO.configura.locaplic+"/ferramentas/navegarquivos/exec.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){var p=i3GEO.configura.locaplic+"/ferramentas/navegarquivos/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="&map_file=&funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMapas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/exec.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo,w,h){i3GEO.php.verifica();if(!w){w=""}if(!h){h=""}if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten+"&w="+w+"&h="+h;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){i3GEO.janela.tempoMsg("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=selecaobox&ext="+i3GEO.util.extOSM2Geo(box)+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(retorno.data.variaveis.mapexten);i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid,checked){var s,p,camadaArvore,par,ck;if(!locaplic||locaplic===""){locaplic=i3GEO.configura.locaplic}if(!sid||sid===""){sid=i3GEO.configura.sid}if(checked||checked==false){s=servico+"&layers="+tema+"&style="+nome;s=s.replace("&&","&");camadaArvore=i3GEO.arvoreDeCamadas.pegaTema(s,"","wmsurl");if(camadaArvore){ck=i3GEO.arvoreDeCamadas.capturaCheckBox(camadaArvore.name);ck.checked=checked;ck.onclick();return}}p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},identifica3:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}ext=i3GEO.util.extOSM2Geo(ext);var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica3&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface=",cp=new cpaint();if(i3GEO.Interface.openlayers.googleLike===true){par+="googlemaps"}else{par+=i3GEO.Interface.ATUAL}cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer,tipo_ws){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer+"&tipo_ws="+tipo_ws;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros&registro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},pegaMetaData:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegametadata&tema="+tema;cpJSON.call(p,"pegametadata",funcao,par)},alteraData:function(funcao,tema,data,removemeta){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data+"&removemeta="+removemeta;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)},listaVariavel:function(funcao,filtro_esquema){if(!filtro_esquema){filtro_esquema=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaVariavel&g_sid="+i3GEO.configura.sid+"&filtro_esquema="+filtro_esquema;i3GEO.util.ajaxGet(p,funcao)},listaMedidaVariavel:function(codigo_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+codigo_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaParametrosMedidaVariavel:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaParametro&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaRegioesMedidaVariavel:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaRegioesMedida&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaValoresParametroMedidaVariavel:function(id_parametro_medida,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaValoresParametro&id_parametro_medida="+id_parametro_medida+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},relatorioVariavel:function(codigo_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=relatorioCompleto&codigo_variavel="+codigo_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaClassificacaoMedida:function(id_medida_variavel,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaClassificacaoMedida&id_medida_variavel="+id_medida_variavel+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaClasseClassificacao:function(id_classificacao,funcao){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaClasseClassificacao&id_classificacao="+id_classificacao;i3GEO.util.ajaxGet(p,funcao)},mapfileMedidaVariavel:function(funcao,id_medida_variavel,filtro,todasascolunas,tipolayer,titulolayer,id_classificacao,agruparpor,codigo_tipo_regiao,opacidade){if(!opacidade){opacidade=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=mapfileMedidaVariavel&formato=json&codigo_tipo_regiao="+codigo_tipo_regiao+"&id_medida_variavel="+id_medida_variavel+"&filtro="+filtro+"&todasascolunas="+todasascolunas+"&tipolayer="+tipolayer+"&titulolayer="+titulolayer+"&id_classificacao="+id_classificacao+"&agruparpor="+agruparpor+"&opacidade="+opacidade+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaTipoRegiao:function(funcao,codigo_tipo_regiao){if(!codigo_tipo_regiao){codigo_tipo_regiao=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaTipoRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},mapfileTipoRegiao:function(funcao,codigo_tipo_regiao,outlinecolor,width,nomes){if(!outlinecolor){outlinecolor="255,0,0"}if(!width){width=1}if(!nomes){nome="nao"}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=mapfileTipoRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;p+="&outlinecolor="+outlinecolor+"&width="+width+"&nomes="+nomes;i3GEO.util.ajaxGet(p,funcao)},listaHierarquiaRegioes:function(funcao,codigo_tipo_regiao,codigoregiaopai,valorregiaopai){if(!codigoregiaopai){codigoregiaopai=""}if(!valorregiaopai){valorregiaopai=""}if(!codigo_tipo_regiao){codigo_tipo_regiao=""}var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaHierarquiaRegioes&codigo_tipo_regiao="+codigo_tipo_regiao+"&codigoregiaopai="+codigoregiaopai+"&valorregiaopai="+valorregiaopai+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},aplicaFiltroRegiao:function(funcao,codigo_tipo_regiao,codigo_regiao){var p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=aplicaFiltroRegiao&codigo_tipo_regiao="+codigo_tipo_regiao+"&codigo_regiao="+codigo_regiao+"&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaCamadasMetaestat:function(funcao){var p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=listaCamadasMetaestat&g_sid="+i3GEO.configura.sid;i3GEO.util.ajaxGet(p,funcao)},listaGruposMapaMetaestat:function(funcao,id_mapa){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaGruposMapa&id_mapa="+id_mapa;i3GEO.util.ajaxGet(p,funcao)},listaTemasMapaMetaestat:function(funcao,id_mapa_grupo){var p=i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaTemasMapa&id_mapa_grupo="+id_mapa_grupo;i3GEO.util.ajaxGet(p,funcao)},salvaMapaBanco:function(funcao,titulo,id_mapa,preferencias,geometrias){if(preferencias){try{preferencias=i3GEO.util.base64encode(i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo"))}catch(e){preferencias=""}}else{preferencias=""}if(geometrias){try{geometrias=i3GEO.mapa.compactaLayerGrafico();if(!geometrias){geometrias=""}}catch(e){geometrias=""}}else{geometrias=""}var url=(window.location.href.split("?")[0]),p=i3GEO.configura.locaplic+"/admin/php/mapas.php?";par="funcao=salvaMapfile"+"&url="+url.replace("#","")+"&arqmapfile="+i3GEO.parametros.mapfile+"&nome_mapa="+titulo+"&id_mapa="+id_mapa;cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p+par,"foo",funcao,"&preferenciasbase64="+preferencias+"&geometriasbase64="+geometrias)},marcadores2shp:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?";par="funcao=marcadores2shp";i3GEO.util.ajaxGet(p+par,funcao)}};
362 362 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.configura={iniciaFerramentas:{executa:function(){var q=i3GEO.configura.iniciaFerramentas.quais,i=0;for(i in q){if(q[i].ativa===true){q[i].funcao.call()}}},"quais":{legenda:{ativa:false,largura:302,altura:300,topo:50,esquerda:100,funcao:function(){var q=i3GEO.configura.iniciaFerramentas.quais.legenda;i3GEO.mapa.legendaHTML.libera("sim",q.largura,q.altura,q.topo,q.esquerda)}},locregiao:{ativa:false,funcao:function(){i3GEO.mapa.dialogo.locregiao()}},metaestat:{ativa:false,funcao:function(){i3GEO.mapa.dialogo.metaestat()}}}},guardaExtensao:true,grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu9",text:$trad("x68"),url:"javascript:i3GEO.janela.tempoMsg(i3GEO.parametros.mensageminicia)"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-6_0-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu1",text:$trad("x67"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo1()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"},{id:"omenudataAnalise20",text:"SAIKU - OLAP",url:"javascript:i3GEO.analise.dialogo.saiku()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos6",text:$trad("x72"),url:"javascript:i3GEO.mapa.dialogo.listaDeMapasBanco()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2a",text:"OpenLayers OSM",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/osm.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Servi&ccedil;os WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperb&oacute;lica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas5a",text:$trad("x59"),url:"javascript:i3GEO.mapa.dialogo.locregiao()"},{id:"omenudataFerramentas6a",text:$trad("x61"),url:"javascript:i3GEO.mapa.dialogo.filtraregiao()"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas7a",text:$trad("x64a"),url:"javascript:i3GEO.mapa.dialogo.congelaMapa();"},{id:"omenudataFerramentas8a",text:$trad("p12"),url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"},{id:"omenudataFerramentas9",text:$trad("x85"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.vinde()"},{id:"omenudataFerramentas10",text:$trad("x93"),url:"javascript:i3GEO.mapa.dialogo.geolocal()"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo1()"},{id:"omenudataFerramentas0e",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("x60")+'</b></span>',url:"#"},{id:"omenudataFerramentas1e",text:$trad("x57"),url:"javascript:i3GEO.mapa.dialogo.metaestat()"},{id:"omenudataFerramentas4e",text:$trad("x71"),url:"javascript:i3GEO.mapa.dialogo.metaestatListaMapas()"},{id:"omenudataFerramentas3e",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"100px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"legenda6.htm",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","",$trad("o2"),"janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(DetectaMobile("DetectMobileLong")){i3GEO.janela.tempoMsg($trad("x70"))}else{i3GEO.janela.tempoMsg($trad("x69"))}if(i3GEO.Interface.ATUAL==="googlemaps"){g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}}},{iddiv:"zoomanterior",tipo:"dinamico",dica:"",titulo:"",funcaoonclick:function(){i3GEO.navega.extensaoAnterior()}},{iddiv:"zoomproximo",tipo:"dinamico",dica:"",titulo:"",funcaoonclick:function(){i3GEO.navega.extensaoProximo()}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.eventos.cliquePerm.ativo===false){if(i3GEO.eventos.MOUSECLIQUE.toString().search(i3GEO.configura.funcaoIdentifica)>=0){i3GEO.eventos.MOUSECLIQUE.remove(i3GEO.configura.funcaoIdentifica);return}i3GEO.eventos.MOUSECLIQUE=[i3GEO.configura.funcaoIdentifica]}else{if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoTip)>=0){i3GEO.eventos.MOUSECLIQUEPERM.remove(i3GEO.configura.funcaoTip)}if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoIdentifica)<0){i3GEO.eventos.MOUSECLIQUEPERM.push(i3GEO.configura.funcaoIdentifica)}}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){i3GEO.janela.tempoMsg($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.eventos.cliquePerm.ativo===false){i3GEO.eventos.MOUSECLIQUE=[i3GEO.configura.funcaoTip]}else{if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoIdentifica)>=0){i3GEO.eventos.MOUSECLIQUEPERM.remove(i3GEO.configura.funcaoIdentifica)}if(i3GEO.eventos.MOUSECLIQUEPERM.toString().search(i3GEO.configura.funcaoTip)<0){i3GEO.eventos.MOUSECLIQUEPERM.push(i3GEO.configura.funcaoTip)}}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=window.location.href;url=url.replace("#","");url=url.split("?");window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","",$trad("x48"));janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="N&atilde;o foi poss&iacute;vel criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);i3GEO.janela.tempoMsg("Clique o ponto de origem da rota")}},{iddiv:"abreJanelaLegenda",tipo:"",dica:$trad("p3"),titulo:$trad("p3"),funcaoonclick:function(){i3GEO.mapa.legendaHTML.libera("sim")}}]}};
363   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
364   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false}),renderer=OpenLayers.Util.getParameters(window.location.href).renderer;style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);renderer=(renderer)?[renderer]:OpenLayers.Layer.Vector.prototype.renderers;i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Edi&ccedil;&atilde;o",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,renderers:renderer,vertexRenderIntent:"vertex"});if(i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}},criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
  363 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(x,y,pixel){var n=x.length,$polygon_area,$i;try{if(n>2){x.push(x[0]);y.push(y[0]);$polygon_area=0;for($i=0;$i<n;$i+=1){$polygon_area+=((x[$i]*y[$i+1])-(y[$i]*x[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
  364 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",layergrafico:null,estilos:{"normal":{fillcolor:'255,0,0',linecolor:'0,0,0',linewidth:'2',circcolor:'255,255,255',textcolor:'100,100,100'},"palido":{fillcolor:'100,100,100',linecolor:'100,100,100',linewidth:'1',circcolor:'100,100,100',textcolor:'100,100,100'},"vermelho":{fillcolor:'100,100,100',linecolor:'255,0,0',linewidth:'1',circcolor:'255,50,0',textcolor:'200,200,200'},"verde":{fillcolor:'100,100,100',linecolor:'100,255,100',linewidth:'1',circcolor:'0,255,0',textcolor:'0,0,0'}},estilosOld:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){if(!i3GEO.desenho.layergrafico){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Graf",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,vertexRenderIntent:"vertex"});if(i3GEO.editorOL&&i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}}},criaContainerRichdraw:function(){i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c,pontosdistobj=i3GEO.analise.pontosdistobj;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){i3GEO.desenho.estiloPadrao=padrao;padrao=i3GEO.desenho.estilosOld[padrao];if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)}},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
365 365 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.Interface={TABLET:false,ALTTABLET:"",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false,pan:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers2131.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade,layer){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade,layer)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},ligaDesliga:function(obj){i3GEO.Interface[i3GEO.Interface.ATUAL].ligaDesliga(obj)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{parametrosMap:{resolutions:[0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.000021457672119140625,0.000010728836059570312,0.000005364418029785156,0.000002682209014892578]},FUNDOTEMA:"yellow",TILES:true,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0003,-0.0003,0.0003,0.0003],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],LAYERFUNDO:"",googleLike:false,redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,temp,j,r,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;if(typeof(OpenLayers)=='undefined'){return}OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";i3GEO.Interface.openlayers.parametrosMap.controls=[];i3GEO.Interface.openlayers.parametrosMap.fractionalZoom=false;if(!i3GEO.Interface.openlayers.parametrosMap.minResolution){i3GEO.Interface.openlayers.parametrosMap.minResolution="auto"}if(!i3GEO.Interface.openlayers.parametrosMap.minExtent){i3GEO.Interface.openlayers.parametrosMap.minExtent=new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3])}if(!i3GEO.Interface.openlayers.parametrosMap.maxResolution){i3GEO.Interface.openlayers.parametrosMap.maxResolution="auto"}if(i3GEO.Interface.openlayers.parametrosMap.numZoomLevels){if(i3GEO.Interface.openlayers.parametrosMap.minResolution=="auto"){temp=0.703125}else{temp=i3GEO.Interface.openlayers.parametrosMap.minResolution}r=[temp];for(j=0;j<(i3GEO.Interface.openlayers.parametrosMap.numZoomLevels-1);j++){temp=temp/2;r.push(temp)}i3GEO.Interface.openlayers.parametrosMap.resolutions=r}if(!i3GEO.Interface.openlayers.parametrosMap.maxExtent){i3GEO.Interface.openlayers.parametrosMap.maxExtent=new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3])}if(!i3GEO.Interface.openlayers.parametrosMap.allOverlays){i3GEO.Interface.openlayers.parametrosMap.allOverlays=false}if(i3GEO.Interface.TABLET===true){i3GEO.Interface.openlayers.parametrosMap.theme=null;i3GEO.Interface.openlayers.parametrosMap.controls=[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true}if(i3GEO.Interface.openlayers.googleLike===true){i3GEO.Interface.openlayers.parametrosMap={numZoomLevels:18,maxResolution:156543.0339,units:'m',projection:new OpenLayers.Projection("EPSG:3857"),displayProjection:new OpenLayers.Projection("EPSG:4326"),controls:[],fractionalZoom:false}};i3geoOL=new OpenLayers.Map('openlayers',i3GEO.Interface.openlayers.parametrosMap)},inicia:function(){if(typeof(OpenLayers)=='undefined'){return}var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].name+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}if(i3GEO.Interface.openlayers.googleLike===true){i3GEO.barraDeBotoes.INCLUIBOTAO.lentei=false}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}i3GEO.configura.iniciaFerramentas.executa();i3GEO.Interface.openlayers.sobeLayersGraficos()},aplicaOpacidade:function(opacidade,layer){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,l,i,camada;if(!layer){layer=""}for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];l=i3geoOL.getLayersByName(camada.name)[0];if(l&&l.isBaseLayer===false){if(layer==""||layer==camada.name){l.setOpacity(opacidade)}}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='op&ccedil;&atilde;o vis&iacute;vel apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}if(i3GEO.Interface.openlayers.googleLike===true){url=configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_OpenLayers_ViewPort")){$i(i3geoOL.id+"_OpenLayers_ViewPort").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){if(camada.cache){urllayer=url+"&cache="+camada.cache+"&layer="+camada.name+"&r="+Math.random()}else{urllayer=url+"&cache=&layer="+camada.name+"&r="+Math.random()}try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(i3GEO.Interface.openlayers.googleLike===false&&camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();if(camada.wmstile==1){layer=new OpenLayers.Layer.TMS(camada.name,camada.wmsurl,{isBaseLayer:false,layername:camada.wmsname,type:'png'})}else{layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes)}if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||(camada.type===0&&camada.cache==="nao")||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}if(opcoes.singleTile===true&&i3GEO.Interface.openlayers.googleLike===false){layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes)}else{if(i3GEO.Interface.openlayers.googleLike===true){layer=new OpenLayers.Layer.OSM(camada.name,urllayer+"&Z=${z}&X=${x}&Y=${y}",{isBaseLayer:false})}else{layer=new OpenLayers.Layer.TMS(camada.name,urllayer,{isBaseLayer:false,serviceVersion:"&tms=",type:"png",layername:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}if(i3GEO.Interface.openlayers.LAYERFUNDO!=""){i3GEO.Interface.openlayers.ativaFundo(i3GEO.Interface.openlayers.LAYERFUNDO)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;if(url.search("\\?")>0){reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");layers[i].url=layers[i].url+"&"+parametro+"="+valor;layers[i].redraw()}}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}i3GEO.Interface.openlayers.sobeLayersGraficos()},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}i3GEO.Interface.openlayers.sobeLayersGraficos()},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){layers[0].setVisibility(obj.checked);if(obj.checked==true){if(navn){i3GEO.Interface.openlayers.atualizaTema("",obj.value)}}}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}},ativaFundo:function(nome){var temp=i3geoOL.getLayersBy("name",nome);if(temp.length>0){i3geoOL.setBaseLayer(temp[0]);if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}i3GEO.Interface.openlayers.LAYERFUNDO=nome}else{i3GEO.Interface.openlayers.LAYERFUNDO=""}},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});if(layers[i].url.search("\\?")>=0){layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&","&foo=");layers[i].url=layers[i].url+"&&"}layers[i].url=layers[i].url.replace("&cache=sim","&cache=nao");if(layers[i].visibility===true){layers[i].redraw()}}}i3GEO.Interface.openlayers.sobeLayersGraficos()},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&","&foo=");layer.url=layer.url+"&&";layer.url=layer.url.replace("&cache=sim","&cache=nao");layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var calcCoord,modoAtual="";calcCoord=function(e){var point,p,lonlat,d,pos,projWGS84,proj900913;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}if(i3GEO.Interface.openlayers.googleLike===true){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(lonlat.lon,lonlat.lat);lonlat=point.transform(proj900913,projWGS84)}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}};i3GEO.eventos.ativa($i(i3geoOL.id+"_OpenLayers_Container"));i3geoOL.events.register("movestart",i3geoOL,function(e){i3GEO.Interface.STATUS.pan=true;var xy;modoAtual="move";i3GEO.barraDeBotoes.BOTAOCLICADO="pan";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.Interface.STATUS.pan=false;i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]);i3GEO.eventos.cliquePerm.status=false;i3GEO.navega.registraExt(i3GEO.parametros.mapexten);i3GEO.Interface.STATUS.pan=false});i3geoOL.events.register("mousemove",i3geoOL,function(e){if(modoAtual==="move"){return}calcCoord(e)})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;ext=i3GEO.util.extGeo2OSM(ext);m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b,true);i3GEO.eventos.cliquePerm.status=true},pan2ponto:function(x,y){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84,proj900913,point,metrica;if(x<180&&x>-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(x,y);metrica=point.transform(projWGS84,proj900913);x=metrica.lon;y=metrica.lat}}i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{ESTILOS:{'Red':[{featureType:'all',stylers:[{hue:'#ff0000'}]}],'Countries':[{featureType:'all',stylers:[{visibility:'off'}]},{featureType:'water',stylers:[{visibility:'on'},{lightness:-100}]}],'Night':[{featureType:'all',stylers:[{invert_lightness:'true'}]}],'Blue':[{featureType:'all',elementType:'geometry',stylers:[{hue:'#0000b0'},{invert_lightness:'true'},{saturation:-30}]}],'Greyscale':[{featureType:'all',stylers:[{saturation:-100},{gamma:0.50}]}],'No roads':[{featureType:'road',stylers:[{visibility:'off'}]}],'Mixed':[{featureType:'landscape',stylers:[{hue:'#00dd00'}]},{featureType:'road',stylers:[{hue:'#dd0000'}]},{featureType:'water',stylers:[{hue:'#000040'}]},{featureType:'poi.park',stylers:[{visibility:'off'}]},{featureType:'road.arterial',stylers:[{hue:'#ffff00'}]},{featureType:'road.local',stylers:[{visibility:'off'}]}],'Chilled':[{featureType:'road',elementType:'geometry',stylers:[{'visibility':'simplified'}]},{featureType:'road.arterial',stylers:[{hue:149},{saturation:-78},{lightness:0}]},{featureType:'road.highway',stylers:[{hue:-31},{saturation:-40},{lightness:2.8}]},{featureType:'poi',elementType:'label',stylers:[{'visibility':'off'}]},{featureType:'landscape',stylers:[{hue:163},{saturation:-26},{lightness:-1.1}]},{featureType:'transit',stylers:[{'visibility':'off'}]},{featureType:'water',stylers:[{hue:3},{saturation:-24.24},{lightness:-38.57}]}]},ESTILOPADRAO:"",MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;google.maps.visualRefresh=true;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");if($i("i3GEOprogressoDiv")){$i("i3GEOprogressoDiv").style.display="block"}montaMapa=function(retorno){var sw,ne,estilo,dobra=$i("i3GEOdobraPagina");if(i3GEO.Interface.googlemaps.ESTILOS&&i3GEO.Interface.googlemaps.ESTILOPADRAO!=""){i3GEO.Interface.googlemaps.MAPOPTIONS.mapTypeId=i3GEO.Interface.googlemaps.ESTILOPADRAO}try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(i3GEO.Interface.googlemaps.ESTILOS&&i3GEO.Interface.googlemaps.ESTILOPADRAO!=""){estilo=i3GEO.Interface.googlemaps.ESTILOS[i3GEO.Interface.googlemaps.ESTILOPADRAO];i3GeoMap.mapTypes.set(i3GEO.Interface.googlemaps.ESTILOPADRAO,new google.maps.StyledMapType(estilo,{name:i3GEO.Interface.googlemaps.ESTILOPADRAO}))}else{i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA)}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}i3GEO.configura.iniciaFerramentas.executa()};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0,camada.cache)}}}i3GEO.Interface.googlemaps.recalcPar()},criaImageMap:function(nomeLayer,cache){var i3GEOTileO="",s;if(cache=="undefined"||cache==undefined){cache=""}s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&cache="+cache+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice,cache){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer,cache);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]);i3GEO.eventos.cliquePerm.status=false;i3GEO.navega.registraExt(i3GEO.parametros.mapexten)});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.navega.registraExt(i3GEO.parametros.mapexten)});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela,pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i].name,listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i].name)}}lista.reverse();n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,(indice));i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade,layer){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;if(!layer){layer=""}for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){if(layer==""||layer==camada.name){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var re=new RegExp(",","g"),pol=mapexten.replace(re," "),ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='op&ccedil;&atilde;o vis&iacute;vel apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&&&&&&&&&&&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomproximo=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomanterior=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}i3GEO.configura.iniciaFerramentas.executa()};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length-1,i,camada,indice,layer;for(i=nlayers;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice==false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar();i3GEO.eventos.cliquePerm.status=false;i3GEO.navega.registraExt(i3GEO.parametros.mapexten)});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","",$trad("u15a"),"i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);$i("i3GEOF.ferramentasGE_c").style.zIndex=100;i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='op&ccedil;&atilde;o vis&iacute;vel apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));if(alt<0){alt=alt*-1}camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};
366   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={TEMASINICIAISLIGADOS:"",TEMASINICIAIS:"",AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(evt){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(evt){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.preventDefault)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){i3GEO.janela.tempoMsg("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{i3GEO.janela.tempoMsg("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:false,ID:"",CAMADASSEMLEGENDA:[],cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg=$i("wlegenda_corpo"),temp=function(retorno){var legenda="",ins,re;re=new RegExp("<img src='' />","g");if(retorno.data!=="erro"&&retorno.data!==undefined){legenda="<div onclick='i3GEO.mapa.legendaHTML.mostraTodosOsTemas()' style=cursor:pointer;font-size:10px;text-align:left; >Mostra tudo</div><br>"+retorno.data.legenda}if(legenda!=""&&idleg){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -35px; top: -22px;">'+$trad("x11")+'</p></div>'}legenda=legenda.replace(re,"");ins+="<div id='corpoLegi' >"+legenda+"</div>";idleg.innerHTML=legenda}i3GEO.mapa.legendaHTML.escondeTemasMarcados()};if(idleg&&idleg.style.display==="block"){if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg){idleg.innerHTML=""}}idleg=$i("wlegenda_corpo");i3GEO.mapa.legendaHTML.obtem(temp)}else{if(idleg){idleg.innerHTML=""}if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},escondeTema:function(tema){var d=$i("legendaLayer_"+tema);if(d){d.style.display="none";i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA.push(tema)}},escondeTemasMarcados:function(){var temas=i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA,n=temas.length,i,temp;for(i=0;i<n;i++){temp=$i(temas[i]);if(temp){temp.style.display="none"}}},mostraTodosOsTemas:function(){i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA=[];i3GEO.mapa.legendaHTML.atualiza()},libera:function(ck,largura,altura,topo,esquerda){if(!ck){ck="nao"}if(!largura){largura=302}if(!altura){altura=300}var cabecalho,minimiza,janela;if(!$i("wlegenda")){cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("wlegenda")};janela=i3GEO.janela.cria(largura+"px",altura+"px","","","",$trad("p3"),"wlegenda",false,"hd",cabecalho,minimiza)}else{janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.show()}$i("wlegenda_corpo").style.backgroundColor="white";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza();if(topo&&esquerda){janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.moveTo(esquerda,topo)}}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{geolocal:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.geolocal()","geolocal","geolocal")},listaDeMapasBanco:function(){if(i3GEO.guias.CONFIGURA["mapas"]){var janela,divid;janela=i3GEO.janela.cria("200px","450px","","","","","i3GEOFsalvaMapaLista",false,"hd");divid=janela[2].id;i3GEO.guias.CONFIGURA["mapas"].click.call(this,divid)}else{window.open(i3GEO.configura.locaplic+"/admin/rssmapas.php","_blank")}},congelaMapa:function(){var url="",idjanela=YAHOO.util.Dom.generateId(),cabecalho=function(){},minimiza=function(){i3GEO.janela.minimiza(idjanela)};if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){url=i3GEO.configura.locaplic+"/ferramentas/congelamapa/openlayers.php?g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);i3GEO.janela.cria("500px","350px",url,"","",$trad("x64"),idjanela,false,"hd",cabecalho,minimiza)}},metaestat:function(){var temp=function(){i3GEOF.metaestat.MULTIPARAMETROS=true;i3GEOF.metaestat.inicia()};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js",temp)},metaestatListaMapas:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()")},preferencias:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias")},locregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.locregiao()","metaestat","locregiao","locregiao.js")},filtraregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraregiao()","metaestat","locregiao","locregiao.js","i3GEOF.locregiao.abreComFiltro()")},animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(x,y){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identifica"&&i3GEO.eventos.cliquePerm.ativo===false){return}i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js",temp=function(){if(x){i3GEOF.identifica.criaJanelaFlutuante(x,y)}else{i3GEOF.identifica.criaJanelaFlutuante()}};i3GEO.util.scriptTag(js,temp,"i3GEOF.identifica_script")}else{if(x){i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,x,y)}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo)}return}},verificaTipDefault:function(e){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identificaBalao"&&i3GEO.eventos.cliquePerm.ativo===false){return}if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}var ntemas,etiquetas,j,retorna,targ="";if(!e){e=window.event}try{if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){targ=null}ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var classeCor,pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span class='toolTipBalaoTitulo'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;classeCor="toolTipBalaoTexto";for(s=0;s<nds;s+=1){ins+="<div class='"+classeCor+"'>";for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}mostra=true}else{ins+="<span>"+valor+"</span><br>";mostra=true}}catch(e){}}if(classeCor==="toolTipBalaoTexto"){classeCor="toolTipBalaoTexto1"}else{classeCor="toolTipBalaoTexto"}ins+="</div>"}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};xy=i3GEO.navega.centroDoMapa();i3GEO.php.identifica3(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}},compactaLayerGrafico:function(){var geos=false,geometrias=[],g=[],n=0,i;if(i3GEO.editorOL&&i3GEO.desenho.layergrafico&&i3GEO.desenho.layergrafico.features){geos=i3GEO.desenho.layergrafico.features;n=geos.length;for(i=0;i<n;i++){g={"atributos":geos[i].attributes,"geometria":geos[i].geometry.toString()};geometrias.push(g)}}g=YAHOO.lang.JSON.stringify(geometrias);return i3GEO.util.base64encode(g)},desCompactaLayerGrafico:function(geometrias){geometrias=YAHOO.lang.JSON.parse(geometrias);if(geometrias.length>0){var inicia=function(){i3GEO.barraDeBotoes.editor.ativaPainel();var n=geometrias.length,i;for(i=0;i<n;i++){i3GEO.editorOL.adicionaFeatureWkt(geometrias[i].geometria,geometrias[i].atributos)}$i(i3GEO.editorOL.layergrafico.id).style.zIndex=5000};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js",inicia,"openlayers.js",true)}},aplicaPreferencias:function(cookies){var props,nprops,i,temp=[],pint;if(!cookies){cookies=i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo")}if(cookies){props=cookies.split("::");nprops=props.length;for(i=0;i<nprops;i++){try{temp=props[i].split("|");pint=parseInt(temp[1],10);if(temp[1]==='true'||temp[1]==='false'){if(temp[1]==='true'){temp[1]=true}if(temp[1]==='false'){temp[1]=false}eval(temp[0]+" = "+temp[1]+";")}else if(pint+"px"==temp[1]){eval(temp[0]+" = '"+temp[1]+"';")}else if(YAHOO.lang.isNumber(pint)){eval(temp[0]+" = "+temp[1]+";")}else{eval(temp[0]+" = '"+temp[1]+"';")}if(temp[0]=="i3GEO.configura.mapaRefDisplay"){i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay",temp[1])}}catch(e){}}}}};
  366 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={TEMASINICIAISLIGADOS:"",TEMASINICIAIS:"",AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(evt){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(evt){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addListener("i3GEOdobraPagina","click",YAHOO.util.Event.preventDefault)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){i3GEO.janela.tempoMsg("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{i3GEO.janela.tempoMsg("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:false,ID:"",CAMADASSEMLEGENDA:[],cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg=$i("wlegenda_corpo"),temp=function(retorno){var legenda="",ins,re;re=new RegExp("<img src='' />","g");if(retorno.data!=="erro"&&retorno.data!==undefined){legenda="<div onclick='i3GEO.mapa.legendaHTML.mostraTodosOsTemas()' style=cursor:pointer;font-size:10px;text-align:left; >Mostra tudo</div><br>"+retorno.data.legenda}if(legenda!=""&&idleg){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -35px; top: -22px;">'+$trad("x11")+'</p></div>'}legenda=legenda.replace(re,"");ins+="<div id='corpoLegi' >"+legenda+"</div>";idleg.innerHTML=legenda}i3GEO.mapa.legendaHTML.escondeTemasMarcados()};if(idleg&&idleg.style.display==="block"){if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg){idleg.innerHTML=""}}idleg=$i("wlegenda_corpo");i3GEO.mapa.legendaHTML.obtem(temp)}else{if(idleg){idleg.innerHTML=""}if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},escondeTema:function(tema){var d=$i("legendaLayer_"+tema);if(d){d.style.display="none";i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA.push(tema)}},escondeTemasMarcados:function(){var temas=i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA,n=temas.length,i,temp;for(i=0;i<n;i++){temp=$i(temas[i]);if(temp){temp.style.display="none"}}},mostraTodosOsTemas:function(){i3GEO.mapa.legendaHTML.CAMADASSEMLEGENDA=[];i3GEO.mapa.legendaHTML.atualiza()},libera:function(ck,largura,altura,topo,esquerda){if(!ck){ck="nao"}if(!largura){largura=302}if(!altura){altura=300}var cabecalho,minimiza,janela;if(!$i("wlegenda")){cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("wlegenda")};janela=i3GEO.janela.cria(largura+"px",altura+"px","","","",$trad("p3"),"wlegenda",false,"hd",cabecalho,minimiza)}else{janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.show()}$i("wlegenda_corpo").style.backgroundColor="white";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza();if(topo&&esquerda){janela=YAHOO.i3GEO.janela.manager.find("wlegenda");janela.moveTo(esquerda,topo)}}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{geolocal:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.geolocal()","geolocal","geolocal")},listaDeMapasBanco:function(){if(i3GEO.guias.CONFIGURA["mapas"]){var janela,divid;janela=i3GEO.janela.cria("200px","450px","","","","","i3GEOFsalvaMapaLista",false,"hd");divid=janela[2].id;i3GEO.guias.CONFIGURA["mapas"].click.call(this,divid)}else{window.open(i3GEO.configura.locaplic+"/admin/rssmapas.php","_blank")}},congelaMapa:function(){var url="",idjanela=YAHOO.util.Dom.generateId(),cabecalho=function(){},minimiza=function(){i3GEO.janela.minimiza(idjanela)};if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){url=i3GEO.configura.locaplic+"/ferramentas/congelamapa/openlayers.php?g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);i3GEO.janela.cria("500px","350px",url,"","",$trad("x64"),idjanela,false,"hd",cabecalho,minimiza)}},metaestat:function(){var temp=function(){i3GEOF.metaestat.MULTIPARAMETROS=true;i3GEOF.metaestat.inicia()};i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js",temp)},metaestatListaMapas:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()")},preferencias:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias")},locregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.locregiao()","metaestat","locregiao","locregiao.js")},filtraregiao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.filtraregiao()","metaestat","locregiao","locregiao.js","i3GEOF.locregiao.abreComFiltro()")},animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){i3GEO.janela.tempoMsg("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(x,y){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identifica"&&i3GEO.eventos.cliquePerm.ativo===false){return}i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js",temp=function(){if(x){i3GEOF.identifica.criaJanelaFlutuante(x,y)}else{i3GEOF.identifica.criaJanelaFlutuante()}};i3GEO.util.scriptTag(js,temp,"i3GEOF.identifica_script")}else{if(x){i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo,x,y)}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo)}return}},verificaTipDefault:function(e){if(objposicaocursor.imgx<70){return}if(i3GEO.barraDeBotoes.BOTAOCLICADO!=="identificaBalao"&&i3GEO.eventos.cliquePerm.ativo===false){return}if(i3GEO.Interface.ATUAL==="googleearth"&&i3GEO.eventos.MOUSECLIQUE.length>1){return}var ntemas,etiquetas,j,retorna,targ="";if(!e){e=window.event}try{if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){targ=null}ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var classeCor,pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span class='toolTipBalaoTitulo'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;classeCor="toolTipBalaoTexto";for(s=0;s<nds;s+=1){ins+="<div class='"+classeCor+"'>";for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}mostra=true}else{ins+="<span>"+valor+"</span><br>";mostra=true}}catch(e){}}if(classeCor==="toolTipBalaoTexto"){classeCor="toolTipBalaoTexto1"}else{classeCor="toolTipBalaoTexto"}ins+="</div>"}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};xy=i3GEO.navega.centroDoMapa();i3GEO.php.identifica3(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}},compactaLayerGrafico:function(){var geos=false,geometrias=[],n=0,i,g;if(i3GEO.editorOL&&i3GEO.desenho.layergrafico&&i3GEO.desenho.layergrafico.features){geos=i3GEO.desenho.layergrafico.features;n=geos.length;for(i=0;i<n;i++){g={"atributos":geos[i].attributes,"geometria":geos[i].geometry.toString()};geometrias.push(g)}}g=YAHOO.lang.JSON.stringify(geometrias);return i3GEO.util.base64encode(g)},desCompactaLayerGrafico:function(geometrias){geometrias=YAHOO.lang.JSON.parse(geometrias);if(geometrias.length>0){var inicia=function(){i3GEO.barraDeBotoes.editor.ativaPainel();var n=geometrias.length,i;for(i=0;i<n;i++){i3GEO.editorOL.adicionaFeatureWkt(geometrias[i].geometria,geometrias[i].atributos)}$i(i3GEO.editorOL.layergrafico.id).style.zIndex=5000};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js",inicia,"openlayers.js",true)}},aplicaPreferencias:function(cookies){var props,nprops,i,temp=[],pint;if(!cookies){cookies=i3GEO.util.pegaDadosLocal("preferenciasDoI3Geo")}if(cookies){props=cookies.split("::");nprops=props.length;for(i=0;i<nprops;i++){try{temp=props[i].split("|");pint=parseInt(temp[1],10);if(temp[1]==='true'||temp[1]==='false'){if(temp[1]==='true'){temp[1]=true}if(temp[1]==='false'){temp[1]=false}eval(temp[0]+" = "+temp[1]+";")}else if(pint+"px"==temp[1]){eval(temp[0]+" = '"+temp[1]+"';")}else if(YAHOO.lang.isNumber(pint)){eval(temp[0]+" = "+temp[1]+";")}else{eval(temp[0]+" = '"+temp[1]+"';")}if(temp[0]=="i3GEO.configura.mapaRefDisplay"){i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay",temp[1])}}catch(e){}}}}};
367 367 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";try{var p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.sobetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.descetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";i3GEO.php.limpasel(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)},tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="";if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)},idtema,valor)}else{i3GEO.janela.tempoMsg($trad("x16"))}},invertestatuslegenda:function(idtema){i3GEO.janela.tempoMsg($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";i3GEO.php.invertestatuslegenda(function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()},idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);i3GEO.php.aplicaCorClasseTema(temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)},idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{i3GEO.janela.tempoMsg($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}if(!$i("janelaLegenda"+idtema)){var janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda},idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js","i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' >&nbsp;&nbsp;&nbsp;</a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}};
368   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={dialogo:{saiku:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku")},graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},graficoInterativo1:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo1()","graficointerativo1","graficointerativo1")},linhaDoTempo:function(){i3GEO.janela.cria("450px","350px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc="",ifr="";try{ifr=$i("wdocai");if(navn){if(ifr){doc=ifr.contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}var ifr=$i("wdocai");ifr.style.width="100%"},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?i3GEO.janela.tempoMsg($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="2px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n+1,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x25")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?i3GEO.janela.tempoMsg("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}}try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}};
  368 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={pontosdistobj:{},dialogo:{saiku:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.saiku()","saiku","saiku")},graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},graficoInterativo1:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo1()","graficointerativo1","graficointerativo1")},linhaDoTempo:function(){i3GEO.janela.cria("450px","350px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc="",ifr="";try{ifr=$i("wdocai");if(navn){if(ifr){doc=ifr.contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}var ifr=$i("wdocai");ifr.style.width="100%"},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?i3GEO.janela.tempoMsg($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{pontos:{},inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();i3GEO.analise.medeDistancia[i3GEO.Interface["ATUAL"]].inicia()},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo_movel" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(i3GEO.analise.pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();if(i3GEO.Interface.ATUAL!=="openlayers"){i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes()}janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer");i3GEO.analise.medeDistancia[i3GEO.Interface["ATUAL"]].fechaJanela()},openlayers:{inicia:function(){var linha,estilo=i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao],controle=i3geoOL.getControlsBy("id","i3GeoMedeDistancia");i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia();i3GEO.analise.medeDistancia.pontos={xpt:[],ypt:[],dist:[]};if(controle.length===0){linha=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},autoActivate:true,id:"i3GeoMedeDistancia",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature,{strokeWidth:estilo.linewidth,strokeColor:estilo.linecolor,origem:"medeDistancia"},{graphicName:"square",pointRadius:10,graphicOpacity:1});i3GEO.desenho.layergrafico.addFeatures([f]);if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}i3GEO.analise.medeDistancia.openlayers.mostraParcial(0,0,0);i3GEO.analise.medeDistancia.openlayers.inicia()},modify:function(point){var n,x1,y1,x2,y2,trecho,parcial,direcao;n=i3GEO.analise.medeDistancia.pontos.ypt.length;if(n>0){x1=i3GEO.analise.medeDistancia.pontos.xpt[n-1];y1=i3GEO.analise.medeDistancia.pontos.ypt[n-1];x2=point.x;y2=point.y;if(i3GEO.Interface.googleLike){temp=i3GEO.util.extOSM2Geo(x1,y1,x2,y2);temp=temp.split(" ");x1=temp[0];y1=temp[1];x2=temp[2];y2=temp[3]}trecho=i3GEO.calculo.distancia(x1,y1,x2,y2);parcial=i3GEO.analise.medeDistancia.openlayers.somaDist();direcao=i3GEO.calculo.direcao(x1,y1,x2,y2);i3GEO.analise.medeDistancia.openlayers.mostraParcial(trecho,parcial,direcao)}},point:function(point){var n,x1,y1,x2,y2,trecho,temp,circ,label,total=0;i3GEO.analise.medeDistancia.pontos.xpt.push(point.x);i3GEO.analise.medeDistancia.pontos.ypt.push(point.y);n=i3GEO.analise.medeDistancia.pontos.ypt.length;if(n>1){x1=i3GEO.analise.medeDistancia.pontos.xpt[n-2];y1=i3GEO.analise.medeDistancia.pontos.ypt[n-2];x2=point.x;y2=point.y;if(i3GEO.Interface.googleLike){temp=i3GEO.util.extOSM2Geo(x1,y1,x2,y2);temp=temp.split(" ");x1=temp[0];y1=temp[1];x2=temp[2];y2=temp[3]}trecho=i3GEO.calculo.distancia(x1,y1,x2,y2);i3GEO.analise.medeDistancia.pontos.dist.push(trecho);total=i3GEO.analise.medeDistancia.openlayers.somaDist();i3GEO.analise.medeDistancia.openlayers.mostraTotal(trecho,total);if($i("pararraios")&&$i("pararraios").checked===true){circ=new OpenLayers.Feature.Vector(OpenLayers.Geometry.Polygon.createRegularPolygon(point,point.distanceTo(new OpenLayers.Geometry.Point(x1,y1)),30),{strokeWidth:1,origem:"medeDistanciaExcluir"},{fill:false,strokeColor:"#FFFFFF"});i3GEO.desenho.layergrafico.addFeatures([circ])}if($i("parartextos")&&$i("parartextos").checked===true){label=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(point.x,point.y),{origem:"medeDistanciaExcluir"},{graphicName:"square",pointRadius:3,strokeColor:"black",graphicOpacity:1,strokeWidth:1,fillColor:"white",label:trecho.toFixed(3),labelAlign:"rb",fontColor:"gray",fontSize:12,fontWeight:"bold"});i3GEO.desenho.layergrafico.addFeatures([label])}}}}});i3geoOL.addControl(linha)}},somaDist:function(){var n,i,total=0;n=i3GEO.analise.medeDistancia.pontos.dist.length;for(i=0;i<n;i++){total+=i3GEO.analise.medeDistancia.pontos.dist[i]}return total},fechaJanela:function(){var temp,controle=i3geoOL.getControlsBy("id","i3GeoMedeDistancia"),f=i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistancia");if(controle.length>0){controle[0].deactivate();i3geoOL.removeControl(controle[0])}if(f&&f.length>0){temp=window.confirm($trad("x94"));if(temp){i3GEO.desenho.layergrafico.destroyFeatures(f)}}f=i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem","medeDistanciaExcluir");if(f&&f.length>0){i3GEO.desenho.layergrafico.destroyFeatures(f)}},mostraTotal:function(trecho,total){var mostra=$i("mostradistancia_calculo"),texto;if(mostra){texto="<b>atual:</b> "+total.toFixed(3)+" km"+"<b>atual:</b> "+(total*1000).toFixed(2)+" m"+"<br>"+$trad("x25")+": "+i3GEO.calculo.metododistancia;mostra.innerHTML=texto}},mostraParcial:function(trecho,parcial,direcao){var mostra=$i("mostradistancia_calculo_movel"),texto;if(mostra){texto="<b>trecho:</b> "+trecho.toFixed(3)+" km"+"<br><b>total:</b> "+(parcial+trecho).toFixed(3)+" km"+"<br><b>"+$trad("x23")+" (DMS):</b> "+direcao;mostra.innerHTML=texto}}},googlemaps:{inicia:function(){if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="2px";g_tipoacao="mede"}else{i3GEO.desenho.richdraw.fecha();var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},fechaJanela:function(){}},googleearth:{inicia:function(){if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";g_tipoacao="mede"}else{var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},fechaJanela:function(){}},clique:function(){var n,d,decimal,dd,pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n+1,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,pontosdistobj=i3GEO.analise.pontosdistobj,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x25")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?i3GEO.janela.tempoMsg("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.eventos.cliquePerm.ativa();i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}i3GEO.barraDeBotoes.ativaIcone("pointer")},clique:function(){var n,m;pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}}try{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}catch(men){}m=i3GEO.calculo.area(pontosdistobj.xtela,pontosdistobj.ytela,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","",i3GEO.configura.locaplic+"/imagens/estasel.png",6,6);i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3,"white")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,pontosdistobj=i3GEO.analise.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}};
369 369 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,VALORSELETORTIPO:"mapa",PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,W:function(){var w=parseInt(i3GEO.parametros.w,10)/5;if(w<150){w=150}return parseInt(w,10)},H:function(){var h=parseInt(i3GEO.parametros.h,10)/5;if(i3GEO.maparef.W()<=150){return 150}else{return parseInt(h,10)}},inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="border:0px solid black;text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span>&nbsp;";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='mapa' >mapa aual</option>";ins+="<option value='dinamico' >Brasil</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:0px solid black;text-align:left;padding:3px;height: '+i3GEO.maparef.H()+'px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel);if($i("refDinamico")){$i("refDinamico").value=i3GEO.maparef.VALORSELETORTIPO}}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:i3GEO.maparef.H()+27+"px",width:i3GEO.maparef.W()+6+"px",fixedcenter:false,constraintoviewport:false,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height=i3GEO.maparef.H()+"px";$i("i3geo_winRef").style.border="0px solid gray";moveX=pos[0]+i3GEO.parametros.w-i3GEO.maparef.W()+3-i3GEO.maparef.RIGHT;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width=i3GEO.maparef.W()+6+"px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef,i3GEO.maparef.W(),i3GEO.maparef.H());if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef,i3GEO.maparef.W(),i3GEO.maparef.H());if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}};
370 370 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,70,"",nx,ny,"&nbsp;","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}};
371 371 if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 1px 5px 1px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:5,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,funcaoAposRedim,dimensionavel){if(!dimensionavel){dimensionavel==true}if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix="contained";if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" >';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:102;position:absolute;left:3px;top:6px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';ins+='<div class="ft"></div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width='100%';$i(id+'_corpo').style.overflow="auto"}if(waltura==="auto"||dimensionavel==false){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:underlay,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.Panel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null});var resize=new YAHOO.util.Resize(id,{handles:['br'],autoRatio:false,minWidth:10,minHeight:10,status:false,proxy:true,ghost:false,animate:false,useShim:true});resize.on('resize',function(args){this.cfg.setProperty("height",args.height+"px")},janela,true);if(funcaoAposRedim&&funcaoAposRedim!=""){resize.on('endResize',function(args){funcaoAposRedim.call();i3GEO.janela.minimiza()},janela,true)}resize.getProxyEl().style.height="0px"}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[4]);janela.render();janela.bringToTop();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=4}YAHOO.util.Event.addListener($i(id+'_corpo'),"click",YAHOO.util.Event.stopPropagation);if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);temp=$i(id+"_corpo");return([janela,$i(id+"_cabecalho"),temp])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id);if(temp){if(temp.style.display==="none"){temp.style.height="100%"}else{temp.style.height="10%"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");i3GEO.util.removeScriptTag(id+".dicionario_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela=$i(id+"_c");janela.parentNode.removeChild(janela)}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span>&nbsp;<span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},tempoMsg:function(texto,tempo){var pos,janela,attributes,anim,altura=40;janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(!janela){janela=new YAHOO.widget.Panel("i3geoTempoMsg",{width:"220px",fixedcenter:false,underlay:"none",close:false,draggable:false,modal:false,monitorresize:false,iframe:true});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}janela.setBody(texto);altura=70;janela.body.style.padding="5px";janela.body.style.backgroundColor="yellow";if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){janela.body.style.height="0px"}else{janela.body.style.height=altura+"px"}janela.body.style.overflow="hidden";janela.body.onclick=function(){var janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(janela){janela.destroy()}};if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){attributes={height:{to:altura}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.body.style.overflow="auto";janela.body.style.display="block";$i("i3geoTempoMsg_c").style.zIndex=100000});anim.animate()}if(!tempo){tempo=4000}setTimeout(function(){var attributes,anim,janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){if(janela){janela.body.style.overflow="hidden";attributes={height:{to:0}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.destroy()});anim.animate()}}else{janela.destroy()}},tempo)},ativaAlerta:function(){window.alert=function(texto){var textoI,janela=YAHOO.i3GEO.janela.managerAguarde.find("alerta");if(!janela){janela=new YAHOO.widget.SimpleDialog("alerta",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:$trad("x74"),handler:function(){this.destroy()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body)}textoI=janela.cfg.getProperty("text");if(textoI!=""){textoI+="<br>"}texto=textoI+texto;janela.cfg.setProperty("text",texto);janela.show()}},confirma:function(pergunta,w,resposta1,resposta2,funcao1,funcao2){var f1,f2,janela=YAHOO.i3GEO.janela.managerAguarde.find("confirma");if(!w||w==""){w=300}if(!funcao1||funcao1==""){f1=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return true}}else{f1=function(){funcao1.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}if(!funcao2||funcao2==""){f2=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return false}}else{f2=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();funcao2.call()}}if(!resposta1||resposta1==""){resposta1=$trad("x58")}if(!resposta2||resposta2==""){resposta2=$trad("x75")}if(janela){janela.destroy()}janela=new YAHOO.widget.SimpleDialog("confirma",{width:w+"px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:false,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:resposta1,handler:f1},{text:resposta2,handler:f2}],icon:YAHOO.widget.SimpleDialog.ICON_HELP,text:pergunta});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body);janela.show()},prompt:function(pergunta,funcaoOk,valorDefault){if($i("i3GEOjanelaprompt")){return}if(!valorDefault){valorDefault=""}var i="<br><input id='i3GEOjanelaprompt' type=text value='"+valorDefault+"' style='position:relative;top:5px;width:98%;cursor:text;' />";i3GEO.janela.confirma(pergunta+i,"","","",funcaoOk)},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","",$trad("t20"),"opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo,funcaoOnChange){var temp=$i(idDiv);if(temp&&!($i(idCombo))){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao,onButtonClick;container.innerHTML=retorno.dados;botao=new YAHOO.widget.Button(idCombo,{type:"menu",menu:idCombo+"select"});if(i3GEO.temaAtivo!=""){tema=i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo);botao.set("label","<span class='cabecalhoTemas' >"+tema.tema+"</span>&nbsp;&nbsp;")}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span>&nbsp;&nbsp;")}onButtonClick=function(p_sType,p_aArgs){var oMenuItem=p_aArgs[1];if(oMenuItem){if(oMenuItem.value!=""){i3GEO.mapa.ativaTema(oMenuItem.value);botao.set("label","<span class='cabecalhoTemas' >"+oMenuItem.cfg.getProperty("text")+"</span>&nbsp;&nbsp;");if(i3GEOF[ferramenta]){i3GEOF[ferramenta].tema=oMenuItem.value;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}}};botao.getMenu().subscribe("click",onButtonClick)},temp.id,"",false,tipo,"",true)}if(i3GEO.eventos.ATUALIZAARVORECAMADAS.length>20){i3GEO.eventos.ATUALIZAARVORECAMADAS=[]}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};
... ... @@ -374,7 +374,7 @@ if(typeof(i3GEO)===&#39;undefined&#39;){var i3GEO={}}i3GEO.arvoreDeCamadas={TEMPLATELEGE
374 374 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:["","","","","","","","","","","","","","","","","","","","","","","","",""],posicao:0,emAcao:false},TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,registraExt:function(ext){var n=i3GEO.navega.EXTENSOES.lista.length;if(ext==""||ext==i3GEO.navega.EXTENSOES.lista[n-1]){i3GEO.navega.EXTENSOES.posicao=0;i3GEO.navega.EXTENSOES.emAcao=false;return}if(i3GEO.navega.EXTENSOES.emAcao===false){i3GEO.navega.EXTENSOES.lista.shift();i3GEO.navega.EXTENSOES.lista.push(ext);i3GEO.navega.EXTENSOES.posicao=0;i3GEO.navega.EXTENSOES.emAcao=false}i3GEO.navega.EXTENSOES.emAcao=false},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var n=i3GEO.navega.EXTENSOES.lista.length,ext;if(i3GEO.navega.EXTENSOES.posicao>=n){i3GEO.navega.EXTENSOES.posicao=0}ext=i3GEO.navega.EXTENSOES.lista[(n-1)-i3GEO.navega.EXTENSOES.posicao];if(ext==i3GEO.parametros.mapexten){ext=i3GEO.navega.EXTENSOES.lista[(n-2)-i3GEO.navega.EXTENSOES.posicao]}i3GEO.navega.EXTENSOES.posicao++;if(ext&&ext!=""){i3GEO.navega.zoomExt("","","",ext)}else{i3GEO.navega.EXTENSOES.posicao=0}},extensaoProximo:function(){i3GEO.navega.EXTENSOES.posicao--;i3GEO.navega.extensaoAnterior()},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa op&ccedil;&atilde;o.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{boxxini:0,boxyini:0,inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";i3GEO.navega.boxxini=objposicaocursor.telax;i3GEO.navega.boxyini=objposicaocursor.telay;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py,boxxini=i3GEO.navega.boxxini,boxyini=i3GEO.navega.boxyini;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,50,"","center","center",$trad("x50")+"&nbsp;&nbsp;","ativadesativaDestaque");$i(janela[2].id).innerHTML=$trad("x91");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}};
375 375 if(typeof(i3GEO)==='undefined'){var i3GEO={}}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:["i3GEO.eventos.cliquePerm.executa()"],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],MOUSECLIQUEPERM:[i3GEO.configura.funcaoTip],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(exy){if(!exy){i3GEO.eventos.executaEventos(this.MOUSEUP)}else{if(exy.target&&(exy.target.style.zIndex==""||exy.target.style.zIndex==1)){var parente=exy.target.parentNode;if(parente&&(parente.className==="olLayerDiv olLayerGrid"||(parente.childNodes&&parente.childNodes[0].attributes[0].nodeValue==="olTileImage"))){i3GEO.eventos.executaEventos(this.MOUSEUP)}}}},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},cliquePerm:{ativo:true,status:true,executa:function(evt){if(i3GEO.eventos.cliquePerm.ativo===true&&i3GEO.eventos.cliquePerm.status===true){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUEPERM)}},ativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=true}},desativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=false}},ativoinicial:true},executaEventos:function(eventos){if(i3GEO.Interface.STATUS.pan===true){return}var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){if(typeof(eventos[f])==="function"){eventos[f].call()}else{eval(eventos[f])}}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){return}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.cliquePerm.status=true;i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa(exy)}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa(exy)}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}};
376 376 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:true,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true,metaestat:true,idonde:""},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIREGIOES:true,INCLUIINDIBR:true,INCLUIWMSMETAESTAT:true,INCLUIMAPASCADASTRADOS:false,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:true,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");window.setTimeout("i3GEO.arvoreDeTemas.IDHTML = '"+idold+"';",520)},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos n&atilde;o definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,tipo_ws:raiz[i].tipo_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:true},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaRegioes:function(){var monta=function(retorno){var node,nraiz,i,html;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idregioes","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"regioesmetaestat","tid":"metaregiao_"+retorno[i].codigo_tipo_regiao,"nome":retorno[i].nome_tipo_regiao},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,enableHighlight:true,tipoa_tema:"METAREGIAO",codigo_tipo_regiao:retorno[i].codigo_tipo_regiao,idtema:"metaregiao_"+retorno[i].codigo_tipo_regiao},node)}node.loadComplete()};i3GEO.php.listaTipoRegiao(monta)},listaMapasCadastrados:function(){var monta=function(retorno){var node,nraiz,i,html,tema;retorno=retorno.data.mapas;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmapacadastrado","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"mapaCadastrado","tid":"mapaCadastrado_"+retorno[i].ID_MAPA,"nome":retorno[i].NOME},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({id_mapaCadastrado:retorno[i].ID_MAPA,html:html,expanded:false,enableHighlight:true},node)}node.loadComplete()};i3GEO.php.pegaMapas(monta)},listaVariaveisMetaestat:function(){var monta=function(retorno){var node,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwmsmetaestat","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){html="<span title='"+retorno[i].descricao+"'> "+retorno[i].nome;html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({codigo_variavel:retorno[i].codigo_variavel,html:html,expanded:false,enableHighlight:true},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMedidasVariavel,1)}node.loadComplete()};i3GEO.php.listaVariavel(monta)},listaMedidasVariavel:function(node){var monta=function(retorno){var tema,html,i,n;n=retorno.length;for(i=0;i<n;i++){tema={"nameInput":"metaestat","id_medida_variavel":retorno[i].id_medida_variavel,"tid":"metaestat_"+retorno[i].id_medida_variavel,"nome":retorno[i].nomemedida},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,enableHighlight:true,tipoa_tema:"META",idtema:"metaestat_"+retorno[i].id_medida_variavel,id_medida_variavel:retorno[i].id_medida_variavel},node)}node.loadComplete()};i3GEO.php.listaMedidaVariavel(node.data.codigo_variavel,monta)},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer,node.data.tipo_ws)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor,link){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\","+"\"\","+"\"\","+"this.checked)";html+="onclick='javascript:"+adiciona+"' "+" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >";if(link){html+="<a href='"+link+"' target=_blank >"+layer+" - "+titulo+"</a>"}else{html+=layer+" - "+titulo}"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data.drives;if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:true},node)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){if($i(i3GEO.arvoreDeTemas.IDHTML)){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)}},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'>&nbsp;"+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' >&nbsp;&nbsp;&nbsp;&nbsp;</a></span></td>"+"<td>"+"<div><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' style=width:112px; value='' /></div>"+"</td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table>&nbsp;";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+"&nbsp;<br>",isLeaf:true,enableHighlight:true,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin' target=blank >"+$trad("x8")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin/html/arvore.html' target=blank >"+$trad("x9")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='"+$trad("x7")+"' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >"+$trad("x10")+"</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIINDIBR===true){var temp=function(){i3GEOF.vinde.inicia("",i3GEO.arvoreDeTemas.ARVORE)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/index.js",temp,"i3GEOF.vinde_script")}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;OGC-WMS</b></span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>"+editor,idwms:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIREGIOES===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;"+$trad("x87")+"</b></span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>",idregioes:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaRegioes,1)}if(i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;"+$trad("x57")+"</b></span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=112' >&nbsp;&nbsp;&nbsp;</a>",idwmsmetaestat:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaVariaveisMetaestat,1)}if(i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;top:-2px;'><b>&nbsp;"+$trad("x90")+"</b></span>",idmapacadastrado:"raiz",expanded:false,enableHighlight:true},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMapasCadastrados,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<span style='position:relative;top:-2px;' ><b>&nbsp;"+$trad("t46")+"</b></span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:true,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b>&nbsp;<span style='position:relative;top:-2px;' title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b>&nbsp;<span title='nao publicado' style='color:red'>"+dados[i].nomemenu+"</span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:true,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>"+$trad("a11")+"</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;if(sis.length>0){do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<span style='color:red'>"+sis[ig].NOME+"</span>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','"+$trad("a11")+"')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(drives,arvore){var temp=function(){var iglt,ig,drive,tempNode;if(!drives){drives=i3GEO.arvoreDeTemas.DRIVES}if(!arvore){arvore=i3GEO.arvoreDeTemas.ARVORE}if(drives==undefined||drives==""||drives.length===0){arvore.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:"&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:true,expanded:false},arvore.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({listaShp:true,listaImg:true,listaFig:false,html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:true,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);arvore.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' style='color:red'>"+grupos[i].nome+"</span>"}}d={html:"<span style='position:relative;top:-2px;'>"+grupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=true;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' style='color:red'>"+subgrupos[i].nome+"</span>"}}d={html:"<span style='position:relative;top:-2px;'>"+subgrupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=true}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' style='color:red' >"+temas[i].nome+"</span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,tipoa_tema:temas[i].tipoa_tema,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos,funcaoClick="i3GEO.util.adicionaSHP";dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false,listaImg:node.data.listaImg,listaFig:node.data.listaFig,listaShp:node.data.listaShp,funcaoClick:funcaoClick},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if((node.data.listaFig===true&&(conteudo.search(".png")>1||conteudo.search(".jpg")>1||conteudo.search(".PNG")>1))||(node.data.listaImg===true&&(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1))||(node.data.listaShp===true&&(conteudo.search(".shp")>1||conteudo.search(".SHP")>1))){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='"+funcaoClick+"(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";if(retorno.data.urls&&retorno.data.urls[ig]!=""){}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,clique;html="<td class='ygtvcontent' style='text-align:left;'>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='position:relative;top:3px;width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img style='position:relative;top:3px;' title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}html+=clique;if(tema.nameInput){html+=" name='"+tema.nameInput+"' "}if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="<span title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='left:4px;cursor:pointer;text-align:left;color:"+cor+";padding-left:0px;position:relative;top:1px;' "+clique+">";html+=tema.nome;html+="</span></td>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}if(OPCOESADICIONAIS.metaestat===true){ins+="<td><img "+estilo("iconeMetaestat")+" onclick='i3GEO.mapa.dialogo.metaestat()' title='Cartogramas estatisticos'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var exec,tempAdiciona=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length>0){exec=function(tsl){var no,p,funcao;if(i3GEO.arvoreDeTemas.ARVORE){no=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idtema",tsl[0]);if(no&&no.data.tipoa_tema==="META"){if(no.data.id_medida_variavel!=undefined&&no.data.id_medida_variavel!=""){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+no.data.id_medida_variavel+")")}else{p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=pegaMetadadosMapfile"+"&idtema="+no.data.idtema+"&g_sid="+i3GEO.configura.sid;funcao=function(retorno){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+retorno.data.id_medida_variavel+")")};cpJSON.call(p,"foo",funcao)}}else if(no&&no.data.tipoa_tema==="METAREGIAO"){p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao"+"&codigo_tipo_regiao="+no.data.codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;funcao=function(){i3GEO.atualiza()};cpJSON.call(p,"foo",funcao)}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}};if(i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){i3GEO.janela.confirma($trad("x76"),300,$trad("x14"),$trad("x15"),function(){exec(tsl)})}else{exec.call(this,tsl)}}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>";return retorno.data};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig++){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conex&atilde;o com servi&ccedil;os</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&atilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},vinde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/index.js","i3GEOF.vinde.criaJanelaFlutuante()","i3GEOF.vinde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","",$trad("x44"))},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","",$trad("x45"))},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","",$trad("a4")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' >&nbsp;&nbsp;&nbsp;</a>")},conectarwmst:function(){i3GEO.janela.cria("600px","400px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","",$trad("x46")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' >&nbsp;&nbsp;&nbsp;</a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","",$trad("x47")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' >&nbsp;&nbsp;&nbsp;</a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var i=parseInt(Math.random()*100,10),janelaeditor=i3GEO.janela.cria(w,h,s,i,10,s,"janela"+i,false),wdocaiframe="";wdocaiframe=$i("janela"+i+"i");if(wdocaiframe){wdocaiframe.style.width="100%";wdocaiframe.style.height="100%"}YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}};
377   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:12,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,imprimir:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.textAlign="center";if(i3GEO.barraDeBotoes.POSICAO==="top"){temp.style.top="25px"}temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(){var temp=function(){var cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("janelaEditorLimites")};i3GEO.janela.cria("300px","100px","","","","Editor","janelaEditorLimites",false,"hd",cabecalho,minimiza);$i("janelaEditorLimites_corpo").style.backgroundColor="white";i3GEOF.editorlimites.inicia("janelaEditorLimites_corpo");i3GEOF.locregiao.iniciaJanelaFlutuante();YAHOO.i3GEO.janela.manager.find("i3GEOF.locregiao").moveTo(100,40)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/metaestat/editorlimites_dependencias.php",temp,"editorlimites_dependencias.php",true)}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};i3GEO.desenho.openlayers.criaLayerGrafico();if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}};
  377 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir:true,google:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.textAlign="center";if(i3GEO.barraDeBotoes.POSICAO==="top"){temp.style.top="25px"}temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transi&ccedil;&atilde;o",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(){var temp=function(){var cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("janelaEditorLimites")};i3GEO.janela.cria("300px","100px","","","","Editor","janelaEditorLimites",false,"hd",cabecalho,minimiza);$i("janelaEditorLimites_corpo").style.backgroundColor="white";i3GEOF.editorlimites.inicia("janelaEditorLimites_corpo");i3GEOF.locregiao.iniciaJanelaFlutuante();YAHOO.i3GEO.janela.manager.find("i3GEOF.locregiao").moveTo(100,40)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/metaestat/editorlimites_dependencias.php",temp,"editorlimites_dependencias.php",true)}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}};
378 378 function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};
379 379 function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
380 380 function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left+"px";vml.style.top=top+"px";vml.style.width=width+"px";vml.style.height=height+"px";if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left+"px";shape.style.marginTop=top+"px"}else{shape.style.left=left+"px";shape.style.top=top+"px"}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10+"px";tracker.style.top=box.y-10+"px";tracker.style.width=box.width+20+"px";tracker.style.height=box.height+20+"px";tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
... ...
mashups/openlayers_compacto.js
... ... @@ -41,7 +41,7 @@ u.style.height=&quot;1px&quot;;u.style.width=&quot;1px&quot;;u.style.position=&quot;absolute&quot;;u.style.lef
41 41 setTimeout(function(){a.removeClass(v,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(j,i){YAHOO.widget.Dialog.superclass.constructor.call(this,j,i);};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},c={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy();}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false);}}}while(j--);}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(i){if(i!="form"&&i!="async"&&i!="none"&&i!="manual"){return false;}else{return true;}}});this.cfg.addProperty(c.POST_DATA.key,{value:c.POST_DATA.value});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes});},initEvents:function(){a.superclass.initEvents.call(this);var i=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=i;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=i;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=i;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=i;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=i;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=i;},init:function(j,i){a.superclass.init.call(this,j);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(i){this.cfg.applyConfig(i,true);}this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a);},doSubmit:function(){var q=YAHOO.util.Connect,r=this.form,l=false,o=false,s,n,m,j;switch(this.cfg.getProperty("postmethod")){case"async":s=r.elements;n=s.length;if(n>0){m=n-1;do{if(s[m].type=="file"){l=true;break;}}while(m--);}if(l&&YAHOO.env.ua.ie&&this.isSecure){o=true;}j=this._getFormAttributes(r);q.setForm(r,l,o);var k=this.cfg.getProperty("postdata");var p=q.asyncRequest(j.method,j.action,this.callback,k);this.asyncSubmitEvent.fire(p);break;case"form":r.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_getFormAttributes:function(k){var i={method:null,action:null};if(k){if(k.getAttributeNode){var j=k.getAttributeNode("action");var l=k.getAttributeNode("method");if(j){i.action=j.value;}if(l){i.method=l.value;}}else{i.action=k.getAttribute("action");i.method=k.getAttribute("method");}}i.method=(f.isString(i.method)?i.method:"POST").toUpperCase();i.action=f.isString(i.action)?i.action:"";return i;},registerForm:function(){var i=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==i&&e.isAncestor(this.element,this.form)){return;}else{b.purgeElement(this.form);this.form=null;}}if(!i){i=document.createElement("form");i.name="frm_"+this.id;this.body.appendChild(i);}if(i){this.form=i;b.on(i,"submit",this._submitHandler,this,true);}},_submitHandler:function(i){b.stopEvent(i);this.submit();this.form.blur();},setTabLoop:function(i,j){i=i||this.firstButton;j=j||this.lastButton;a.superclass.setTabLoop.call(this,i,j);},_setTabLoop:function(i,j){i=i||this.firstButton;j=this.lastButton||j;this.setTabLoop(i,j);},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break;}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break;}}}},configClose:function(j,i,k){a.superclass.configClose.apply(this,arguments);},_doClose:function(i){b.preventDefault(i);this.cancel();},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text,type:u.type});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q;}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this});}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)});}}this._aButtons[this._aButtons.length]=k;}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q;}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true);}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this));}}p.appendChild(q);this._aButtons[this._aButtons.length]=q;}u.htmlButton=q;if(m===0){this.firstButton=q;}if(m==(r-1)){this.lastButton=q;}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j);}this.buttonSpan=p;}else{p=this.buttonSpan;
42 42 j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.changeContentEvent.fire();},getButtons:function(){return this._aButtons||null;},focusFirst:function(k,i,n){var j=this.firstFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.firstElement){j=this.firstElement;}}if(j){try{j.focus();m=true;}catch(l){}}else{if(this.defaultHtmlButton){m=this.focusDefaultButton();}else{m=this.focusFirstButton();}}return m;},focusLast:function(k,i,n){var o=this.cfg.getProperty("buttons"),j=this.lastFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.lastElement){j=this.lastElement;}}if(o&&f.isArray(o)){m=this.focusLastButton();}else{if(j){try{j.focus();m=true;}catch(l){}}}return m;},_getButton:function(j){var i=YAHOO.widget.Button;if(i&&j&&j.nodeName&&j.id){j=i.getButton(j.id)||j;}return j;},focusDefaultButton:function(){var i=this._getButton(this.defaultHtmlButton),k=false;if(i){try{i.focus();k=true;}catch(j){}}return k;},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur();}catch(m){}}}}while(j--);}}},focusFirstButton:function(){var m=this.cfg.getProperty("buttons"),k,i,l=false;if(m&&f.isArray(m)){k=m[0];if(k){i=this._getButton(k.htmlButton);if(i){try{i.focus();l=true;}catch(j){}}}}return l;},focusLastButton:function(){var n=this.cfg.getProperty("buttons"),j,l,i,m=false;if(n&&f.isArray(n)){j=n.length;if(j>0){l=n[(j-1)];if(l){i=this._getButton(l.htmlButton);if(i){try{i.focus();m=true;}catch(k){}}}}}return m;},configPostMethod:function(j,i,k){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var A=this.form,k,t,w,m,u,r,q,j,x,l,y,B,p,C,o,z,v;function s(n){var i=n.tagName.toUpperCase();return((i=="INPUT"||i=="TEXTAREA"||i=="SELECT")&&n.name==m);}if(A){k=A.elements;t=k.length;w={};for(z=0;z<t;z++){m=k[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;j=u.tagName.toUpperCase();switch(j){case"INPUT":if(q=="checkbox"){w[m]=u.checked;}else{if(q!="radio"){w[m]=u.value;}}break;case"TEXTAREA":w[m]=u.value;break;case"SELECT":x=u.options;l=x.length;y=[];for(v=0;v<l;v++){B=x[v];if(B.selected){o=B.attributes.value;y[y.length]=(o&&o.specified)?B.value:B.text;}}w[m]=y;break;}}else{q=u[0].type;switch(q){case"radio":for(v=0;v<r;v++){p=u[v];if(p.checked){w[m]=p.value;break;}}break;case"checkbox":y=[];for(v=0;v<r;v++){C=u[v];if(C.checked){y[y.length]=C.value;}}w[m]=y;break;}}}}}return w;},destroy:function(i){d.call(this);this._aButtons=null;var j=this.element.getElementsByTagName("form"),k;if(j.length>0){k=j[0];if(k){b.purgeElement(k);if(k.parentNode){k.parentNode.removeChild(k);}this.form=null;}}a.superclass.destroy.call(this,i);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(e,d){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,e,d);};var c=YAHOO.util.Dom,b=YAHOO.widget.SimpleDialog,a={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};b.ICON_BLOCK="blckicon";b.ICON_ALARM="alrticon";b.ICON_HELP="hlpicon";b.ICON_INFO="infoicon";b.ICON_WARN="warnicon";b.ICON_TIP="tipicon";b.ICON_CSS_CLASSNAME="yui-icon";b.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(b,YAHOO.widget.Dialog,{initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);this.cfg.addProperty(a.ICON.key,{handler:this.configIcon,value:a.ICON.value,suppressEvent:a.ICON.suppressEvent});this.cfg.addProperty(a.TEXT.key,{handler:this.configText,value:a.TEXT.value,suppressEvent:a.TEXT.suppressEvent,supercedes:a.TEXT.supercedes});},init:function(e,d){b.superclass.init.call(this,e);this.beforeInitEvent.fire(b);c.addClass(this.element,b.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(d){this.cfg.applyConfig(d,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(b);},registerForm:function(){b.superclass.registerForm.call(this);var e=this.form.ownerDocument,d=e.createElement("input");d.type="hidden";d.name=this.id;d.value="";this.form.appendChild(d);},configIcon:function(k,j,h){var d=j[0],e=this.body,f=b.ICON_CSS_CLASSNAME,l,i,g;if(d&&d!="none"){l=c.getElementsByClassName(f,"*",e);if(l.length===1){i=l[0];g=i.parentNode;if(g){g.removeChild(i);i=null;}}if(d.indexOf(".")==-1){i=document.createElement("span");i.className=(f+" "+d);i.innerHTML="&#160;";}else{i=document.createElement("img");i.src=(this.imageRoot+d);i.className=f;}if(i){e.insertBefore(i,e.firstChild);}}},configText:function(e,d,f){var g=d[0];if(g){this.setBody(g);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim;}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f;};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.element);h.handleUnderlayStart=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){var j=(k.filters&&k.filters.length>0);if(j){b.addClass(d.element,"yui-effect-fade");}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade");}};h.handleStartAnimateIn=function(k,j,l){l.overlay._fadingIn=true;b.addClass(l.overlay.element,"hide-select");if(!l.overlay.underlay){l.overlay.cfg.refireEvent("underlay");
43 43 }l.handleUnderlayStart();l.overlay._setDomVisibility(true);b.setStyle(l.overlay.element,"opacity",0);};h.handleCompleteAnimateIn=function(k,j,l){l.overlay._fadingIn=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateInCompleteEvent.fire();};h.handleStartAnimateOut=function(k,j,l){l.overlay._fadingOut=true;b.addClass(l.overlay.element,"hide-select");l.handleUnderlayStart();};h.handleCompleteAnimateOut=function(k,j,l){l.overlay._fadingOut=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.overlay._setDomVisibility(false);b.setStyle(l.overlay.element,"opacity",1);l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateOutCompleteEvent.fire();};h.init();return h;};a.SLIDE=function(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px";};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){r.overlay._setDomVisibility(true);}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire();};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q];};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateOut=function(o,n,p){p.overlay._setDomVisibility(false);p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire();};g.init();return g;};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate();},lastFrameOnStop:true,_stopAnims:function(d){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(d);}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(d);}},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]";}return d;}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.9.0",build:"2800"});
44   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
  44 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(x,y,pixel){var n=x.length,$polygon_area,$i;try{if(n>2){x.push(x[0]);y.push(y[0]);$polygon_area=0;for($i=0;$i<n;$i+=1){$polygon_area+=((x[$i]*y[$i+1])-(y[$i]*x[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
45 45 if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},listaTodasChaves:function(obj){var keys,key="";keys=[];for(key in obj){keys.push(key)}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,criaNo;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=true}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=true;criaNo=function(obj,noDestino){var trad,i,j,linha,conteudo,temaNode,c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){trad=$trad(linha.text);if(!trad){trad=linha.text}conteudo="<a href='#' onclick='"+linha.url+"'>"+trad+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,noDestino,false,true);temaNode.enableHighlight=false;if(obj.propriedades[i].propriedades){criaNo(obj.propriedades[i],temaNode)}}};criaNo(obj,tempNode);arvore.collapseAll();arvore.draw();return arvore},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;novoel.id=id;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<span class=digitar onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' ><input onchange=\""+onch+"\" tabindex='0' onclick='javascript:this.select();' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' /></span>"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci,w,h){if(!w){w=5}if(!h){h=5}if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-(h/2))+"px";i.left=(xi-(w/2))+"px";i.width=w+"px";i.height=h+"px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width=w+"px";temp.height=h+"px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.Panel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},getScrollHeight:function(){var mx=Math.max,d=document;return mx(mx(d.body.scrollHeight,d.documentElement.scrollHeight),mx(d.body.offsetHeight,d.documentElement.offsetHeight),mx(d.body.clientHeight,d.documentElement.clientHeight))},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;try{for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[2]&&t[2]=="dicionario_script"){return false}if(t[0]===texto){return true}}return false}catch(e){return false}},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo,estilo,yui){if(onde&&onde!==""){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(!nome){nome=""}if(!multiplo){multiplo=false}if(!estilo||estilo==""){estilo="font-size: 12px;width: 95%;"}if(!yui){yui=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas='',n,nome="";if(yui===true){comboTemas='<input type="button" name='+id+'_button id="'+id+'" value="'+$trad("x33")+'&nbsp;&nbsp;">';id=id+"select";nome=id}if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas+="<select style='"+estilo+"' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas+="<select style='"+estilo+"' id='"+id+"' name='"+nome+"'>"}if(yui===false){comboTemas+="<option value=''>----</option>"}for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="locais"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="editavel"){temp=i3GEO.arvoreDeCamadas.filtraCamadas("editavel","SIM","igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(temp)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}},checkCombo:function(id,nomes,valores,estilo,funcaoclick,ids,idschecked){var temp,i,combo="",n=valores.length;if(n>0){combo="<div style='"+estilo+"'><table class=lista3 id="+id+" >";for(i=0;i<n;i++){temp="";if(idschecked&&idschecked[i]){temp="checked"}if(!ids){combo+="<tr><td><input "+temp+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}else{combo+="<tr><td><input "+temp+" id="+ids[i]+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}}combo+="</table></div>"}return combo},valoresCheckCombo:function(id){var el=$i(id),res=[],n,i;if(el){el=el.getElementsByTagName("input");n=el.length;for(i=0;i<n;i++){if(el[i].checked===true){res.push(el[i].value)}}}return res},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left;width:"+size+" cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome,alias){if(!alias){alias="sim"}if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i,nm;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){if(alias=="sim"){nm=retorno.data.valores[i].alias;if(nm===""){nm=retorno.data.valores[i].item}}else{nm=retorno.data.valores[i].item}ins.push("<option value='"+retorno.data.valores[i].item+"' >"+nm+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo,ordenacao){if(!ordenacao||ordenacao==""){ordenacao=="nao"}if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >"+$trad("x65")+"</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){if(ordenacao==="sim"){ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td>Ordem</td>")}else{ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td></td>")}n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left;cursor:text;width:"+size+"' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text value='"+retorno.data.valores[i].item+"' /></td>");if(ordenacao==="sim"){ins.push("<td><input style='text-align:left; cursor:text;' id='ordem_"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='3' value='"+i+"' /></td>")}else{ins.push("<td></td>")}ins.push("</tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >'+$trad("x66")+'</div>',tipo:"erro"}}funcao.call(this,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var c="checked",ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");n=retorno.data.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' "+c+" name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");c="";ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},comboEpsg:function(idCombo,onde,funcaoOnChange,valorDefault){onde=$i(onde);onde.innerHTML="<span style=color:red;font-size:10px; >buscando...</span>";var monta=function(retorno){var ins=[],i,n;if(retorno.data!==undefined){n=retorno.data.length;ins.push("<select id='"+idCombo+"' onChange='"+funcaoOnChange+"(this)' >");for(i=0;i<n;i++){ins.push("<option value='"+retorno.data[i].codigo+"'>"+retorno.data[i].nome+"</option>")}ins.push("</select>");ins=ins.join('');onde.innerHTML=ins;$i(idCombo).value=valorDefault}else{onde.innerHTML='<div class=erro >Ocorreu um erro</div>'}};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container,mantem,onde){var temp=$i(idatual),botoes="",ndiv=document.createElement("div"),nids,i,fundo;if(!mantem){mantem=false}if(temp&&mantem==false){$i(container).removeChild(temp)}fundo="#F2F2F2";$i(container).style.backgroundColor="white";botoes="<table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){botoes+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){botoes+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}botoes+="</tr></table>";var ativaBotoes=function(anterior,proxima,idatual){var i;new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}};if(onde){$i(onde).innerHTML=botoes}else{texto=texto+"<br><br>"+botoes}if(!document.getElementById(idatual)){ndiv.id=idatual;ndiv.innerHTML=texto;$i(container).appendChild(ndiv)}ativaBotoes(anterior,proxima,idatual);temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome,nomejs,nomefuncao){if(!nomejs){nomejs="index.js"}if(!nomefuncao){nomefuncao="i3GEOF."+nome+".criaJanelaFlutuante();"}var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/"+nomejs;if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde("i3GEOF."+nome+"_script"+"aguarde","Carregando JS");i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}else{i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,temp,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento+"&locaplic="+i3GEO.configura.locaplic,nx="",texto="",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";if(i3GEO&&i3GEO.arvoreDeCamadas){ins+="<div id='i3geo_janelaCorRampComboCabeca' class='comboTemasCabecalho' style='top:0px;'> ------</div>"}ins+="&nbsp;&nbsp;&nbsp;"+texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="380px";wdocaiframe.style.width="100%";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.Panel(id,{height:"430px",modal:false,width:"280px",fixedcenter:fix,constraintoviewport:true,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe;if($i("i3geo_janelaCorRampComboCabeca")){temp=function(){var p,tema=$i("i3geo_janelaCorRampComboCabecaSel").value,funcao=function(retorno){parent.frames["i3geo_janelaCorRampi"].document.getElementById("ncores").value=retorno.data.length};if(tema!==""){i3GEO.mapa.ativaTema(tema);p=i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=editalegenda&opcao=edita&tema="+tema;i3GEO.util.ajaxGet(p,funcao);cp=new cpaint()}};i3GEO.janela.comboCabecalhoTemas("i3geo_janelaCorRampComboCabeca","i3geo_janelaCorRampComboCabecaSel","none","ligados",temp)}},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectTierTablet");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},detectaMobile:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret},ajaxGet:function(sUrl,funcaoRetorno){sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');re=new RegExp("%3A","g");sUrl=sUrl.replace(re,':');var falhou=function(e){},callback={success:function(o){try{funcaoRetorno.call("",YAHOO.lang.JSON.parse(o.responseText))}catch(e){falhou(e)}},failure:falhou,argument:{foo:"foo",bar:"bar"}};YAHOO.util.Connect.asyncRequest("GET",sUrl,callback)},verifica_html5_storage:function(){if(typeof(Storage)!=="undefined"){return true}else{return false}},pegaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){return window.localStorage[item]}else{return false}},limpaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){window.localStorage.clear(item)}},gravaDadosLocal:function(item,valor){if(i3GEO.util.verifica_html5_storage()){window.localStorage[item]=valor;return true}else{return false}},extGeo2OSM:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1<=180&&temp[0]*1>=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(projWGS84,proj900913);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(projWGS84,proj900913);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},extOSM2Geo:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1>=180||temp[0]*1<=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(proj900913,projWGS84);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(proj900913,projWGS84);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},navegadorDir:function(obj,listaShp,listaImg,listaFig){if(!obj){listaShp=true;listaImg=true;listaFig=true}var temp=function(){i3GEOF.navegarquivos.iniciaDicionario(obj,listaShp,listaImg,listaFig)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorDir()","navegarquivos","navegarquivos","index.js",temp)},navegadorPostgis:function(obj,conexao,tipo){if(!obj){conexao=""}if(!tipo){tipo="sql"}var temp=function(){i3GEOF.navegapostgis.iniciaDicionario(obj,conexao,tipo)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorPostgis()","navegapostgis","navegapostgis","index.js",temp)},base64encode:function(str){var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i<len){c1=str.charCodeAt(i++)&0xff;if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break}c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break}c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F)}return out},base64decode:function(str){var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i<len){do{c1=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c1==-1);if(c1==-1)break;do{c2=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c2==-1);if(c2==-1)break;out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3]}while(i<len&&c3==-1);if(c3==-1)break;out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4]}while(i<len&&c4==-1);if(c4==-1)break;out+=String.fromCharCode(((c3&0x03)<<6)|c4)}return out}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};
46 46 /*
47 47 OpenLayers.js -- OpenLayers Map Viewer Library
... ... @@ -1478,5 +1478,5 @@ b){var c={};c.isDefault=&quot;true&quot;===a.getAttribute(&quot;isDefault&quot;);this.readChildNodes
1478 1478 c);b.matrixIds.push(c)},ScaleDenominator:function(a,b){b.scaleDenominator=parseFloat(this.getChildValue(a))},TopLeftCorner:function(a,b){var c=this.getChildValue(a).split(" "),d;b.supportedCRS&&(d=b.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2"),d=!!this.yx[d]);b.topLeftCorner=d?new OpenLayers.LonLat(c[1],c[0]):new OpenLayers.LonLat(c[0],c[1])},TileWidth:function(a,b){b.tileWidth=parseInt(this.getChildValue(a))},TileHeight:function(a,b){b.tileHeight=parseInt(this.getChildValue(a))},
1479 1479 MatrixWidth:function(a,b){b.matrixWidth=parseInt(this.getChildValue(a))},MatrixHeight:function(a,b){b.matrixHeight=parseInt(this.getChildValue(a))},ResourceURL:function(a,b){b.resourceUrl=b.resourceUrl||{};var c=a.getAttribute("resourceType");b.resourceUrls||(b.resourceUrls=[]);c=b.resourceUrl[c]={format:a.getAttribute("format"),template:a.getAttribute("template"),resourceType:c};b.resourceUrls.push(c)},WSDL:function(a,b){b.wsdl={};b.wsdl.href=a.getAttribute("xlink:href")},ServiceMetadataURL:function(a,
1480 1480 b){b.serviceMetadataUrl={};b.serviceMetadataUrl.href=a.getAttribute("xlink:href")},LegendURL:function(a,b){b.legend={};b.legend.href=a.getAttribute("xlink:href");b.legend.format=a.getAttribute("format")},Dimension:function(a,b){var c={values:[]};this.readChildNodes(a,c);b.dimensions.push(c)},Default:function(a,b){b["default"]=this.getChildValue(a)},Value:function(a,b){b.values.push(this.getChildValue(a))}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"});
1481   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false}),renderer=OpenLayers.Util.getParameters(window.location.href).renderer;style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);renderer=(renderer)?[renderer]:OpenLayers.Layer.Vector.prototype.renderers;i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Edi&ccedil;&atilde;o",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,renderers:renderer,vertexRenderIntent:"vertex"});if(i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}},criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
1482   -if(typeof(i3GEO)==='undefined'){var i3GEO={};navn=false;navm=false;$i=function(id){return document.getElementById(id)};app=navigator.appName.substring(0,1);if(app==='N'){navn=true}else{navm=true}OpenLayers.ImgPath="../pacotes/openlayers/img/";OpenLayers.Lang.setCode("pt-BR")}i3GEO.editorOL={simbologia:{opacidade:0.8,texto:"",fillColor:"250,180,15",strokeWidth:2,strokeColor:"250,150,0",pointRadius:4,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},backup:new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}),nomeFuncaoSalvar:"i3GEO.editorOL.salvaGeo()",e_oce:new OpenLayers.Layer.ArcGIS93Rest("ESRI Ocean Basemap","http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_ims:new OpenLayers.Layer.ArcGIS93Rest("ESRI Imagery World 2D","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_wsm:new OpenLayers.Layer.ArcGIS93Rest("ESRI World Street Map","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),ol_mma:new OpenLayers.Layer.WMS("Base cartogr&aacute;fica","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&",{layers:'baseraster',SRS:'EPSG:4618',FORMAT:'image/png'},{singleTile:false}),ol_wms:new OpenLayers.Layer.WMS("OpenLayers WMS","http://labs.metacarta.com/wms/vmap0",{layers:'basic'}),top_wms:new OpenLayers.Layer.WMS("Topon&iacute;mia MMA","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseref.map&",{layers:"base",FORMAT:'image/png'}),est_wms:new OpenLayers.Layer.WMS("Estados do Brasil","http://mapas.mma.gov.br/i3geo/ogc.php?tema=estadosl&",{layers:"estadosl",FORMAT:'image/png'}),fundo:"e_ims,e_wsm,ol_mma,ol_wms,top_wms,est_wms,e_oce",kml:[],layersIniciais:[],botoes:{'pan':true,'zoombox':true,'zoomtot':true,'zoomin':true,'zoomout':true,'legenda':true,'distancia':true,'area':true,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'listag':true,'corta':true,'apaga':true,'procura':true,'selecao':true,'salva':true,'ajuda':true,'propriedades':true,'fecha':false,'tools':true,'undo':false,'frente':false,'legenda':true,'rodadomouse':true},pontos:[],marca:"../pacotes/openlayers/img/marker-gold.png",controles:[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoomBar(),new OpenLayers.Control.LayerSwitcher({'ascending':false}),new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.MousePosition({'separator':' '}),new OpenLayers.Control.OverviewMap(),new OpenLayers.Control.KeyboardDefaults()],tiles:true,incluilayergrafico:true,ativalayerswitcher:false,ativarodadomouse:true,legendahtml:false,numzoom:12,maxext:"",mapext:new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081),mapa:"",inicia:function(){var single=false,alayers=[],fundo=(i3GEO.editorOL.fundo).split(","),nfundo=fundo.length,ncontroles=i3GEO.editorOL.controles.length,i,n;if(i3GEO.editorOL.tiles===false||i3GEO.editorOL.tiles==="false"){single=true}if(i3GEO.editorOL.ativalayerswitcher==="false"){i3GEO.editorOL.ativalayerswitcher=false}if(i3GEO.editorOL.ativalayerswitcher==="true"){i3GEO.editorOL.ativalayerswitcher=true}if(i3GEO.editorOL.ativarodadomouse==="false"){i3GEO.editorOL.ativarodadomouse=false}if(i3GEO.editorOL.ativarodadomouse==="true"){i3GEO.editorOL.ativarodadomouse=true}if(i3GEO.editorOL.legendahtml==="false"){i3GEO.editorOL.legendahtml=false}if(i3GEO.editorOL.legendahtml==="true"){i3GEO.editorOL.legendahtml=true}if(i3GEO.editorOL.incluilayergrafico==="false"){i3GEO.editorOL.incluilayergrafico=false}if(i3GEO.editorOL.incluilayergrafico==="true"){i3GEO.editorOL.incluilayergrafico=true}if(i3GEO.editorOL.incluilayergrafico===true){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.editorOL.criaLayerGrafico()}}else{i3GEO.desenho.layergrafico="";i3GEO.editorOL.botoes.linha=false;i3GEO.editorOL.botoes.ponto=false;i3GEO.editorOL.botoes.poligono=false;i3GEO.editorOL.botoes.texto=false;i3GEO.editorOL.botoes.edita=false;i3GEO.editorOL.botoes.listag=false;i3GEO.editorOL.botoes.corta=false;i3GEO.editorOL.botoes.apaga=false;i3GEO.editorOL.botoes.selecao=false;i3GEO.editorOL.botoes.salva=false;i3GEO.editorOL.botoes.propriedades=false;i3GEO.editorOL.botoes.fecha=false;i3GEO.editorOL.botoes.tools=false;i3GEO.editorOL.botoes.undo=false;i3GEO.editorOL.botoes.frente=false}if(i3GEO.editorOL.mapa===""){alert("O objeto i3GEO.editorOL.mapa precisa ser criado com new OpenLayers.Map()");return}for(i=0;i<ncontroles;i++){i3GEO.editorOL.mapa.addControl(i3GEO.editorOL.controles[i])}if(i3GEO.editorOL.fundo!=""){for(i=nfundo-1;i>=0;i--){if(fundo[i]!=""){try{eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';");eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);");eval("i3GEO.editorOL."+fundo[i]+".singleTile = false;");eval("alayers.push(i3GEO.editorOL."+fundo[i]+");")}catch(e){if(alayers[0]){alayers[0].setVisibility(true)}}}}}i3GEO.editorOL.mapa.addLayers(alayers);if(i3GEO.editorOL.layersIniciais!==""){n=i3GEO.editorOL.layersIniciais.length;for(i=0;i<n;i++){i3GEO.editorOL.layersIniciais[i].singleTile=single;i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i])}}if(i3GEO.desenho.layergrafico!==""){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}i3GEO.editorOL.adicionaKml();i3GEO.editorOL.adicionaMarcas();i3GEO.editorOL.coordenadas();i3GEO.editorOL.criaJanelaBusca();i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);if(i3GEO.editorOL.ativalayerswitcher===true){i3GEO.editorOL.ativaLayerSwitcher()}if(i3GEO.editorOL.ativarodadomouse===false){i3GEO.editorOL.desativaRodaDoMouse()}if(i3GEO.editorOL.numzoom!==""){i3GEO.editorOL.mapa.setOptions({numZoomLevels:i3GEO.editorOL.numzoom})}if(i3GEO.editorOL.maxext!==""){i3GEO.editorOL.mapa.setOptions({maxExtent:i3GEO.editorOL.maxext})}if(i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}},criaLayerGrafico:function(){i3GEO.desenho.openlayers.criaLayerGrafico()},layersLigados:function(){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,ins=[],i;for(i=0;i<nlayers;i++){if(layers[i].visibility===true){ins.push(layers[i])}}return ins},layersClonados:function(paramsLayers){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].params&&layers[i].params.CLONETMS===paramsLayers){return(layers[i])}}return false},layertms2wms:function(tms){var layer,url;url=tms.url.replace("&cache=sim","&DESLIGACACHE=sim");url=url.replace("&Z=${z}&X=${x}&Y=${y}","");layer=new OpenLayers.Layer.WMS(tms.layername+"_clone",url,{layers:tms.name,transparent:true},{gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:true,singleTile:true});return layer},removeClone:function(){var nome=i3GEO.editorOL.layerAtivo().layername+"_clone",busca=i3GEO.editorOL.mapa.getLayersByName(nome);if(busca.length>0){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.mapa.getLayersByName(camada.name)[0],false)}},coordenadas:function(){var idcoord=i3GEO.editorOL.mapa.getControlsBy("separator"," ");if(idcoord[0]){i3GEO.editorOL.mapa.events.register("mousemove",i3GEO.editorOL.mapa,function(e){var p,lonlat,d;if(navm){p=new OpenLayers.Pixel(e.x,e.y)}else{p=e.xy}lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(p);d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{$i(idcoord[0].id).innerHTML="Long: "+d[0]+"<br>Lat: "+d[1]}catch(e){}})}},criaJanelaBusca:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,ins,combo="<select id=i3GEOOLlistaTemasBusca ><option value=''>----</option>";for(i=0;i<nlayers;i++){combo+="<option value='"+i+"' >"+layers[i].name+"</option>"}combo+="</select>";ins="<div class=paragrafo >Tema:<br>"+combo;ins+="<br>Item:<br><span id=i3GEOOLcomboitens ></span>";ins+="<br>Procurar por:<br><input type=text size=20 id=i3GEOOLpalavraBusca >";ins+="<br><br><input type=button value='Procurar' id='i3GEOOLbotaoBusca' ></div>";ins+="<br>Resultado:<br><span id=i3GEOOLcomboresultado ></span>";try{YAHOO.namespace("procura.container");YAHOO.procura.container.panel=new YAHOO.widget.Panel("panelprocura",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.procura.container.panel.setHeader("Encontre no mapa");YAHOO.procura.container.panel.setBody(ins);YAHOO.procura.container.panel.setFooter("");YAHOO.procura.container.panel.render(document.body);YAHOO.procura.container.panel.center();document.getElementById("i3GEOOLbotaoBusca").onclick=function(){var layer=i3GEO.editorOL.layerAtivo(),item=document.getElementById("i3GEOOLbuscaItem").value,palavra=document.getElementById("i3GEOOLpalavraBusca").value;if(item===""||palavra===""){alert("Escolha o item e o texto de busca");return}i3GEO.editorOL.busca(layer,item,palavra,"i3GEOOLcomboresultado")};document.getElementById("i3GEOOLlistaTemasBusca").onchange=function(){i3GEO.editorOL.ativaTema(this.value);document.getElementById("i3GEOOLcomboitens").innerHTML="...";i3GEO.editorOL.listaItens(i3GEO.editorOL.layerAtivo(),"i3GEOOLcomboitens","i3GEOOLbuscaItem")}}catch(e){}},criaComboTemas:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,nometema="",temp,combo="<select id=i3GEOOLlistaTemasAtivos style=width:235px; >";for(i=0;i<nlayers;i++){nometema="";if(i3GEO.arvoreDeCamadas&&i3GEO.arvoreDeCamadas.CAMADAS){temp=i3GEO.arvoreDeCamadas.pegaTema(layers[i].name,"","name");if(temp!=""){nometema=temp.tema+" - "}}combo+="<option value='"+i+"' >"+nometema+layers[i].name+"</option>"}combo+="</select>";return combo},atualizaJanelaAtivaTema:function(){var combo=i3GEO.editorOL.criaComboTemas();YAHOO.temaativo.container.panel.setBody(combo);document.getElementById("i3GEOOLlistaTemasAtivos").onchange=function(){if(botaoIdentifica){botaoIdentifica.layers=[i3GEO.editorOL.layersLigados()[this.value]]}}},criaJanelaAtivaTema:function(){var temp;if(!document.getElementById("paneltemaativo")){YAHOO.namespace("temaativo.container");YAHOO.temaativo.container.panel=new YAHOO.widget.Panel("paneltemaativo",{zIndex:20000,iframe:true,width:"250px",visible:false,draggable:true,close:true});YAHOO.temaativo.container.panel.setBody("");if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.temaativo.container.panel.setHeader("Tema ativo<div id='paneltemaativo_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.temaativo.container.panel.setHeader("Tema ativo")}YAHOO.temaativo.container.panel.setFooter("");YAHOO.temaativo.container.panel.render(document.body);YAHOO.temaativo.container.panel.show();YAHOO.temaativo.container.panel.center();i3GEO.editorOL.atualizaJanelaAtivaTema();YAHOO.util.Event.addListener(YAHOO.temaativo.container.panel.close,"click",function(){i3GEOpanelEditor.deactivate();i3GEOpanelEditor.activate();if(i3GEO.eventos&&i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")>0){i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()")}});if(typeof i3GEO!=undefined&&i3GEO!=""){if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEO.editorOL.atualizaJanelaAtivaTema()")}}temp=$i("paneltemaativo_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("paneltemaativo")}}}else{YAHOO.temaativo.container.panel.show();i3GEO.editorOL.atualizaJanelaAtivaTema()}},ativaTema:function(id){document.getElementById("i3GEOOLlistaTemasAtivos").value=id},layerAtivo:function(){var id=document.getElementById("i3GEOOLlistaTemasAtivos");if(id){id=id.value}else{id=i3GEO.temaAtivo}if(id==""){return[]}else{return i3GEO.editorOL.layersLigados()[id]}},listaItens:function(layer,idonde,idobj){if(!layer){return}if(!layer.params){return}var u=layer.url+"&request=describefeaturetype&service=wfs&version=1.0.0";u+="&typename="+layer.params.LAYERS;document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.WFSDescribeFeatureType({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),prop=gml.featureTypes[0].properties,nprop=prop.length,i,combo="<select id="+idobj+" ><option value=''>----</option>";for(i=0;i<nprop;i++){combo+="<option value="+prop[i].name+" >"+prop[i].name+"</option>"}combo+="</select>";document.getElementById(idonde).innerHTML=combo},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},busca:function(layer,item,palavra,onde){document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";var u=layer.url+"&request=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layer.params.LAYERS;u+="&filter=<Filter><PropertyIsLike wildcard=* singleChar=. escape=! ><PropertyName>"+item+"</PropertyName><Literal>*"+palavra+"*</Literal></PropertyIsLike></Filter>";document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";document.getElementById(onde).innerHTML="...";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),ngml=gml.length,i,ins="<select onchange='i3GEO.editorOL.zoomPara(this.value)'>";ins+="<option value=''>---</option>";for(i=0;i<ngml;i++){eval("var valor = gml[i].data."+item);var bounds=gml[i].geometry.getBounds();bounds=bounds.toBBOX();ins+="<option value='"+bounds+"'>"+valor+"</option>"}ins+="</select>";document.getElementById(onde).innerHTML=ins},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},zoomPara:function(bbox){var b=new OpenLayers.Bounds.fromString(bbox);i3GEO.editorOL.mapa.zoomToExtent(b)},mostraLegenda:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,ins="",i;for(i=0;i<nlayers;i++){try{if(layers[i].isBaseLayer===false){var url=layers[i].getFullRequestString({"request":"getlegendgraphic"});if(i3GEO.editorOL.legendahtml===true){url=url.replace("image%2Fpng","text/html");ins+=layers[i].name+"<br><div id=legendaL_"+i+" ></div><br>";eval("var f = function(retorno){document.getElementById('legendaL_"+i+"').innerHTML = retorno.responseText;};");var config={method:"GET",url:url,callback:f};OpenLayers.Request.issue(config)}else{url=url.replace("LAYERS","LAYER");ins+=layers[i].name+"<br><img src='"+url+"' /><br>"}}}catch(e){}}if(!document.getElementById("panellegendaeditorOL")){YAHOO.namespace("legendaeditorOL.container");YAHOO.legendaeditorOL.container.panel=new YAHOO.widget.Panel("panellegendaeditorOL",{zIndex:20000,iframe:true,width:"auto",visible:false,draggable:true,close:true});YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.setHeader("Legenda");YAHOO.legendaeditorOL.container.panel.setFooter("");YAHOO.legendaeditorOL.container.panel.render(document.body);YAHOO.legendaeditorOL.container.panel.show();YAHOO.legendaeditorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close,"click",function(){})}else{YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.show()}},captura:function(lonlat){var layers=[i3GEO.editorOL.layerAtivo()],xy=lonlat.split(","),u=layers[0].url+"&REQUEST=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS;u=u.replace("&cache=sim","&DESLIGACACHE=sim");u=u.replace("&Z=${z}&X=${x}&Y=${y}","");xy[0]=xy[0]*1;xy[1]=xy[1]*1;var poligono=(xy[0]-0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1);u+="&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>";document.body.style.cursor="wait";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="wait"}OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}var i,n,f,fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText);n=gml.length;for(i=0;i<n;i++){f=gml[i];f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,registros:f["attributes"]}}i3GEO.desenho.layergrafico.addFeatures(gml)},failure:function(){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}alert("Erro")}})},salvaGeometrias:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="";if(n>0){if($i("panelsalvageometrias")){YAHOO.salvaGeometrias.container.panel=YAHOO.i3GEO.janela.manager.find("panelsalvageometrias");YAHOO.salvaGeometrias.container.panel.show();YAHOO.salvaGeometrias.container.panel.bringToTop()}else{try{YAHOO.namespace("salvaGeometrias.container");YAHOO.salvaGeometrias.container.panel=new YAHOO.widget.Panel("panelsalvageometrias",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.salvaGeometrias.container.panel.setHeader("Geometrias");YAHOO.salvaGeometrias.container.panel.setBody("");YAHOO.salvaGeometrias.container.panel.setFooter("");YAHOO.salvaGeometrias.container.panel.render(document.body);YAHOO.salvaGeometrias.container.panel.center();if(YAHOO.i3GEO.janela){YAHOO.i3GEO.janela.manager.register(YAHOO.salvaGeometrias.container.panel)}YAHOO.salvaGeometrias.container.panel.show()}catch(e){}}ins+="<p class=paragrafo >Foram encontrada(s) "+n+" geometria(s) selecionada(s) </p>";ins+="<p class=paragrafo ><a href='#' onclick='i3GEO.editorOL.listaGeometriasSel()' >Listar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='"+i3GEO.editorOL.nomeFuncaoSalvar+"' >Salvar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>";YAHOO.salvaGeometrias.container.panel.setBody(ins)}else{alert("Selecione pelo menos um elemento")}},exportarSHP:function(){i3GEO.editorOL.processageo("converteSHP")},listaGeometriasSel:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="",i,a,w,g;for(i=0;i<n;i++){g=geos[i];ins+="<b>Geometria: "+i+"</b><br>"+i3GEO.editorOL.google2wgs(g.geometry)+"<br><br>";ins+="<b>Atributos: "+i+"</b><br>";a=g.attributes;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}if(g.attributes.registros){ins+="<b>Registros: "+i+"</b><br>";a=g.attributes.registros;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}}}w=window.open();w.document.write(ins);w.document.close()},testeSalvar:function(){alert("Funcao nao disponivel. Defina o nome da funcao em i3GEO.editorOL.nomeFuncaoSalvar ")},salvaGeo:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,funcaoOK=function(){if(geos[0].geometry){var registros="",valorunico="",nometema=$i("editorOLcomboTemaEditavel").value,key="",tema,redesenha,p,g=i3GEO.editorOL.google2wgs(geos[0].geometry);if(nometema==""){return}tema=i3GEO.arvoreDeCamadas.pegaTema(nometema,"","name");if(geos[0].attributes.registros){registros=geos[0].attributes.registros;for(key in registros){if(registros[key]&&key==tema.colunaidunico){valorunico=registros[key]}}}redesenha=function(retorno){i3GEO.janela.fechaAguarde("aguardeSalvaPonto");i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);i3GEO.Interface.atualizaTema("",nometema)};i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardeSalvaPonto","Adicionando...");i3GEO.janela.AGUARDEMODAL=false;if(valorunico==""){p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&tema="+nometema+"&wkt="+g)}else{p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=atualizaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&idunico="+valorunico+"&tema="+nometema+"&wkt="+g)}}},funcaoCombo=function(obj){$i("editorOLondeComboTemaEditavel").innerHTML=obj.dados},texto="Salvar no tema:<br><div id=editorOLondeComboTemaEditavel ></div><br><br>";if(n!=1){i3GEO.janela.tempoMsg("Selecione apenas uma figura")}else{i3GEO.janela.confirma(texto,300,"Salva","Cancela",funcaoOK);i3GEO.util.comboTemas("editorOLcomboTemaEditavel",funcaoCombo,"editorOLondeComboTemaEditavel","",false,"editavel")}},criaBotoes:function(botoes){var sketchSymbolizers={"Point":{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},"Line":{strokeWidth:3,strokeOpacity:1,strokeColor:"#666666",strokeDashstyle:"dash"},"Polygon":{strokeWidth:2,strokeOpacity:1,strokeColor:"#666666",fillColor:"white",fillOpacity:0.3}},style=new OpenLayers.Style(),styleMap=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:3}},{extendDefault:false}),adiciona=false,button,controles=[];style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEOpanelEditor=new OpenLayers.Control.Panel({displayClass:"olControlEditingToolbar1 noprint",saveState:false,activateControl:function(c){this.deactivate();this.activate();try{i3GEO.editorOL.ModifyFeature.deactivate();if(i3GEO&&i3GEO.barraDeBotoes){i3GEO.barraDeBotoes.ativaPadrao()}}catch(e){}if(!c.trigger){c.activate()}else{c.trigger.call()}}});if(botoes.procura===true){button=new OpenLayers.Control.Button({displayClass:"editorOLprocura",trigger:function(){YAHOO.procura.container.panel.show()},title:"procura",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.pan===true){controles.push(new OpenLayers.Control.Navigation({title:"deslocar",displayClass:"editorOLpan",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoombox===true){controles.push(new OpenLayers.Control.ZoomBox({title:"zoombox",displayClass:"editorOLzoombox",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoomtot===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomtot",trigger:function(){if(i3GEO.editorOL.mapext&&i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}},title:"ajusta extensao",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomin===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomin",trigger:function(){i3GEO.editorOL.mapa.zoomIn()},title:"aproxima",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomout===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomout",trigger:function(){i3GEO.editorOL.mapa.zoomOut()},title:"afasta",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.legenda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlegenda",trigger:function(){i3GEO.editorOL.mostraLegenda()},title:"legenda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.distancia===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLdistancia",title:"distancia",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units,measure=event.measure;alert("Dist&acirc;ncia: "+measure.toFixed(3)+" "+units)}});controles.push(button);adiciona=true}if(botoes.area===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLarea",title:"area",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units;var measure=event.measure;alert("&Aacute;rea: "+measure.toFixed(3)+" "+units+" quadrados")}});controles.push(button);adiciona=true}if(botoes.identifica===true){botaoIdentifica=new OpenLayers.Control.WMSGetFeatureInfo({maxFeatures:1,infoFormat:'text/plain',layers:[i3GEO.editorOL.layerAtivo()],queryVisible:true,title:"identifica",type:OpenLayers.Control.TYPE_TOOL,displayClass:"editorOLidentifica",eventListeners:{getfeatureinfo:function(event){var lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),lonlattexto="<hr>",formata;if(botoes.linha===true||botoes.ponto===true||botoes.poligono===true||botoes.edita===true){lonlattexto+="<pre><span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>edita geometria</span></pre><br>"}formata=function(texto){var temp,temp1,n,i,f=[],textoN=texto.split(":");try{if(textoN.length>1){temp=textoN[2].replace(/\n\r/g,"");temp=temp.replace(/'/g,"");temp=temp.replace(/\n/g,"|");temp=temp.replace(/_/g," ");temp=temp.replace(/=/g,":");temp=temp.split("|");n=temp.length;for(i=0;i<n;i++){temp1=temp[i].replace(/^\s+/,"");temp1=temp1.replace(/\s+$/,"");if(temp1!="")f.push(temp1)}texto=f.join("<br><br>")}}catch(e){}return texto};i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("chicken",i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),null,"<div style=text-align:left >"+lonlattexto+"<pre>"+formata(event.text)+"</pre></div>",null,true));i3GEO.editorOL.removeClone()},beforegetfeatureinfo:function(event){var ativo=[i3GEO.editorOL.layerAtivo()];if(ativo[0].CLASS_NAME=="OpenLayers.Layer.TMS"||ativo[0].CLASS_NAME=="OpenLayers.Layer.OSM"){ativo=[i3GEO.editorOL.layertms2wms(ativo[0])]}ativo[0].projection=new OpenLayers.Projection("EPSG:4326");event.object.layers=ativo;botaoIdentifica.layers=ativo;botaoIdentifica.url=ativo[0].url},activate:function(){i3GEO.editorOL.criaJanelaAtivaTema()}}});controles.push(botaoIdentifica);adiciona=true}if(botoes.linha===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{displayClass:"editorOLlinha",title:"digitalizar linha",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.ponto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLponto",title:"digitalizar ponto",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=[];if(i3GEO.editorOL.simbologia.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=i3GEO.editorOL.simbologia.externalGraphic;style_mark.graphicWidth=i3GEO.editorOL.simbologia.graphicWidth;style_mark.graphicHeight=i3GEO.editorOL.simbologia.graphicHeight;style_mark.fillOpacity=i3GEO.editorOL.simbologia.opacidade;f=new OpenLayers.Feature.Vector(feature,null,style_mark)}else{f=new OpenLayers.Feature.Vector(feature)}f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,externalGraphic:i3GEO.editorOL.simbologia.externalGraphic,graphicHeight:i3GEO.editorOL.simbologia.graphicHeight,graphicWidth:i3GEO.editorOL.simbologia.graphicWidth};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.poligono===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLpoligono",title:"digitalizar poligono",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.texto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLtexto",title:"incluir texto",type:OpenLayers.Control.TYPE_TOOL,persist:true,callbacks:{done:function(feature){var texto=window.prompt("Texto",""),label=new OpenLayers.Feature.Vector(feature);label["attributes"]={opacidade:0.1,fillColor:"white",strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,texto:texto,pointRadius:2,graphicName:"square",strokeColor:"black",fontColor:i3GEO.editorOL.simbologia.fontColor,fontSize:i3GEO.editorOL.simbologia.fontSize,fontFamily:"Arial",fontWeight:"bold",labelAlign:"rt"};if(texto&&texto!==""){i3GEO.desenho.layergrafico.addFeatures([label])}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.edita===true&&botoes.corta===true&&i3GEO.php){i3GEO.editorOL.CortaFeature=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLcorta",title:"corta figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length!=1){alert("Selecione primeiro um elemento para ser cortado");i3GEO.editorOL.CortaFeature.deactivate()}else{i3GEO.editorOL.CortaFeature.activate()}},callbacks:{done:function(feature){var temp,sel=i3GEO.desenho.layergrafico.selectedFeatures[0].geometry,corta=feature;temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.cortador");if(retorno!=""&&retorno.data&&retorno.data!=""){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}};i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando");i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference")}}});controles.push(i3GEO.editorOL.CortaFeature);adiciona=true}if(botoes.edita===true){i3GEO.editorOL.ModifyFeature=new OpenLayers.Control.ModifyFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLedita",title:"modifica figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,mode:OpenLayers.Control.ModifyFeature.RESHAPE,standalone:false,createVertices:true,styleMap:"default",vertexRenderIntent:"vertex"});controles.push(i3GEO.editorOL.ModifyFeature);adiciona=true}if(botoes.edita===true&&botoes.listag===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlistag",trigger:function(){i3GEO.editorOL.listaGeometrias()},title:"lista geometrias",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.frente===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfrente",trigger:function(){i3GEO.editorOL.trazParaFrente();if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},title:"traz para frente",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.tools===true&&i3GEO.php){button=new OpenLayers.Control.Button({displayClass:"editorOLtools",trigger:function(){if(i3GEO.php){i3GEO.editorOL.ferramentas()}else{i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()")}},title:"ferramentas",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.selecao===true){i3GEO.editorOL.selbutton=new OpenLayers.Control.SelectFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLselecao",title:"seleciona elemento",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,multiple:false,hover:false,toggleKey:"ctrlKey",multipleKey:"shiftKey",box:false});controles.push(i3GEO.editorOL.selbutton);adiciona=true}if(botoes.apaga===true){button=new OpenLayers.Control.Button({displayClass:"editorOLapaga",trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length>0){var x=window.confirm("Exclui os elementos selecionados?");if(x){i3GEO.editorOL.guardaBackup();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}else{alert("Selecione pelo menos um elemento")}},title:"apaga selecionados",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.propriedades===true){button=new OpenLayers.Control.Button({displayClass:"editorOLpropriedades",trigger:function(){i3GEO.editorOL.propriedades()},title:"propriedades",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.salva===true){button=new OpenLayers.Control.Button({displayClass:"editorOLsalva",trigger:function(){i3GEO.editorOL.salvaGeometrias()},title:"salva",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.ajuda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLajuda",trigger:function(){try{window.open(i3GEO.configura.locaplic+"/mashups/openlayers_ajuda.php")}catch(e){window.open("openlayers_ajuda.php")}},title:"ajuda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.fecha===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfecha",trigger:function(){var temp=window.confirm("Remove a edicao?");if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}i3GEOpanelEditor.destroy();try{YAHOO.temaativo.container.panel.destroy()}catch(e){}try{YAHOO.procura.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.listaGeometrias.panel.destroy()}catch(e){}try{YAHOO.editorOL.ferramentas.panel.destroy()}catch(e){}try{YAHOO.legendaeditorOL.container.panel.destroy()}catch(e){}try{YAHOO.salvaGeometrias.container.panel.destroy()}catch(e){}if(temp===true){try{if(i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.removeLayer(i3GEO.desenho.layergrafico);delete(i3GEO.desenho.layergrafico)}if(i3GEO.editorOL.backup){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.backup);delete(i3GEO.editorOL.backup)}}catch(e){}}},title:"fecha editor",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}i3GEOOLsnap=new OpenLayers.Control.Snapping({layer:i3GEO.desenho.layergrafico});i3GEOOLsplit=new OpenLayers.Control.Split({layer:i3GEO.desenho.layergrafico,source:i3GEO.desenho.layergrafico,tolerance:0.0001,eventListeners:{beforesplit:function(event){i3GEO.editorOL.guardaBackup()},aftersplit:function(event){i3GEO.editorOL.flashFeatures(event.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}});if(adiciona===true){i3GEOpanelEditor.addControls(controles);i3GEO.editorOL.mapa.addControl(i3GEOpanelEditor)}},mudaSimbolo:function(estilo,id){var valor=$i(id).value,geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,i;i3GEO.editorOL.simbologia[estilo]=valor;for(i=0;i<n;i++){geos[i].attributes[estilo]=valor;geos[i].style[estilo]=valor}},adicionaMarcas:function(){if(i3GEO.editorOL.pontos.length===0){return}var SHADOW_Z_INDEX=10,MARKER_Z_INDEX=11,layer=new OpenLayers.Layer.Vector("pontos",{styleMap:new OpenLayers.StyleMap({externalGraphic:i3GEO.editorOL.marca,backgroundGraphic:"../pacotes/openlayers/img/marker_shadow.png",backgroundXOffset:0,backgroundYOffset:-7,graphicZIndex:MARKER_Z_INDEX,backgroundGraphicZIndex:SHADOW_Z_INDEX,pointRadius:10}),isBaseLayer:false,rendererOptions:{yOrdering:true},displayInLayerSwitcher:true,visibility:true}),index,x=[],y=[],features=[];for(index=0;index<i3GEO.editorOL.pontos.length;index=index+2){x.push(i3GEO.editorOL.pontos[index]);y.push(i3GEO.editorOL.pontos[index+1])}for(index=0;index<x.length;index++){features.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x[index],y[index])))}layer.addFeatures(features);i3GEO.editorOL.mapa.addLayer(layer)},adicionaKml:function(){var temp,n,i,id,url;n=i3GEO.editorOL.kml.length;for(i=0;i<n;i++){id="kml"+i;url=i3GEO.editorOL.kml[i];eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3GEO.editorOL.mapa.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,g,html="";if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3GEO.editorOL.mapa.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(var j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}}},propriedades:function(){if(!document.getElementById("panelpropriedadesEditor")){YAHOO.namespace("editorOL.container");YAHOO.editorOL.container.panel=new YAHOO.widget.Panel("panelpropriedadesEditor",{zIndex:20000,iframe:true,width:"350px",height:"250px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo ><b>Estilos (utilize a cor no formato r,g,b):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td>Cor do contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeColor\',\'i3GEOEditorOLcorContorno\')" type="text" style="cursor:text" id="i3GEOEditorOLcorContorno" size="12" value="'+i3GEO.editorOL.simbologia.strokeColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorContorno\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor do preenchimento</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fillColor\',\'i3GEOEditorOLcorPre\')" type="text" style="cursor:text" id="i3GEOEditorOLcorPre" size="12" value="'+i3GEO.editorOL.simbologia.fillColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorPre\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontColor\',\'i3GEOEditorOLcorFonte\')" type="text" style="cursor:text" id="i3GEOEditorOLcorFonte" size="12" value="'+i3GEO.editorOL.simbologia.fontColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorFonte\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Tamanho da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontSize\',\'i3GEOEditorOLfontsize\')" type="text" style="cursor:text" id="i3GEOEditorOLfontsize" size="3" value="'+i3GEO.editorOL.simbologia.fontSize+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Opacidade (de 0 a 1)</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'opacidade\',\'i3GEOEditorOLopacidade\')" type="text" style="cursor:text" id="i3GEOEditorOLopacidade" size="3" value="'+i3GEO.editorOL.simbologia.opacidade+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura da linha/contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeWidth\',\'i3GEOEditorOLlarguraLinha\')" type="text" style="cursor:text" id="i3GEOEditorOLlarguraLinha" size="2" value="'+i3GEO.editorOL.simbologia.strokeWidth+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Url de uma figura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'externalGraphic\',\'i3GEOEditorOLexternalGraphic\')" type="text" style="cursor:text" id="i3GEOEditorOLexternalGraphic" size="22" value="'+i3GEO.editorOL.simbologia.externalGraphic+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura e altura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicWidth\',\'i3GEOEditorOLgraphicWidth\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicWidth" size="4" value="'+i3GEO.editorOL.simbologia.graphicWidth+'" />&nbsp;<input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicHeight\',\'i3GEOEditorOLgraphicHeight\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicHeight" size="4" value="'+i3GEO.editorOL.simbologia.graphicHeight+'" /></td><td></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Ajusta n� em edi&ccedil;&atilde;o para o(a):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td></td><td>n�</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_node" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_nodeTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_vertex" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_vertexTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Divide intersec&ccedil;&atilde;o ao digitalizar</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.split()" type="checkbox" id="edge_split_toggle" /></td><td>borda</td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Opera&ccedil;&atilde;o ativada pelo bot&atilde;o de modifica&ccedil;&atilde;o da figura</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input checked style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESHAPE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera figura</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESIZE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera tamanho</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.ROTATE;" type="radio" name=i3geoOLtipoEdita /></td><td>rotaciona</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.DRAG;" type="radio" name=i3geoOLtipoEdita /></td><td>desloca</td>'+' </tr>'+'</table>';YAHOO.editorOL.container.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.container.panel.setHeader("Propriedades<div id='panelpropriedadesEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.container.panel.setHeader("Propriedades")}YAHOO.editorOL.container.panel.setFooter("");YAHOO.editorOL.container.panel.render(document.body);YAHOO.editorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close,"click",function(){});temp=$i("panelpropriedadesEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelpropriedadesEditor")}}}YAHOO.editorOL.container.panel.show();temp=$i("panelpropriedadesEditor").getElementsByTagName("div");if(temp&&temp[2]){temp[2].style.overflow="auto"}},listaGeometrias:function(){if(!document.getElementById("panellistagEditor")){YAHOO.namespace("editorOL.listaGeometrias");YAHOO.editorOL.listaGeometrias.panel=new YAHOO.widget.Panel("panellistagEditor",{zIndex:20000,iframe:true,width:"320px",visible:false,draggable:true,close:true});if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias <div id='panellistagEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias")}YAHOO.editorOL.listaGeometrias.panel.setFooter("");YAHOO.editorOL.listaGeometrias.panel.render(document.body);YAHOO.editorOL.listaGeometrias.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.listaGeometrias.panel.close,"click",function(){YAHOO.editorOL.listaGeometrias.panel.destroy()});temp=$i("panellistagEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panellistagEditor")}}}else{YAHOO.editorOL.listaGeometrias.panel.render(document.body)}var g,temp,geos=i3GEO.desenho.layergrafico.features,n=geos.length,ins="<table class=lista4 >";ins+="<tr><td><i>Geometrias</i></td><td><i>Op&ccedil;&otilde;es</i></td><td></td><td></td></tr>";while(n>0){n-=1;g=geos[n].geometry;ins+="<tr><td>"+g.CLASS_NAME+"</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.selFeature("+n+")'>seleciona</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.unselFeature("+n+")'>limpa</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.flashFeaturesI("+n+")'>brilha</td></tr>"}ins+="</table>";if(geos.length===0){ins="Nenhum elemento gr&aacute;fico encontrado. Utilize as op&ccedil;&otilde;es de cria&ccedil;&atilde;o de geometrias."}YAHOO.editorOL.listaGeometrias.panel.show();if(i3GEO.configura){temp=$i("panellistagEditor").getElementsByTagName("div")[2]}else{temp=$i("panellistagEditor").getElementsByTagName("div")[1]}temp.style.overflow="auto";temp.style.height="100px";temp.innerHTML=ins},ferramentas:function(){if(!document.getElementById("panelferramentasEditor")){YAHOO.namespace("editorOL.ferramentas");YAHOO.editorOL.ferramentas.panel=new YAHOO.widget.Panel("panelferramentasEditor",{zIndex:20000,iframe:true,width:"300px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo >Opera&ccedil;&otilde;es sobre as figuras selecionadas:</p>'+'<select onchange="i3GEO.editorOL.processageo(this.value);this.value = \'\'" >'+' <option value="">---</option>'+' <option value=union >Uni&atilde;o</option>';if(i3GEO.php){ins+=' <option value=intersection >Intersec&ccedil;&atilde;o</option>'+' <option value=convexhull >Convex hull</option>'+' <option value=boundary >Bordas</option>'+' <option value=difference >Diferen&ccedil;a</option>'+' <option value=symdifference >Diferen&ccedil;a sim&eacute;trica</option>'}ins+='</select>'+'<br><br><a class=paragrafo href=# onclick="i3GEO.desenho.layergrafico.destroyFeatures()" >Apaga tudo</a>';YAHOO.editorOL.ferramentas.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas <div id='panelferramentasEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas")}YAHOO.editorOL.ferramentas.panel.setFooter("");YAHOO.editorOL.ferramentas.panel.render(document.body);YAHOO.editorOL.ferramentas.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.ferramentas.panel.close,"click",function(){});temp=$i("panelferramentasEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelferramentasEditor")}}}else{YAHOO.editorOL.ferramentas.panel.render(document.body)}YAHOO.editorOL.ferramentas.panel.show()},snap:function(){var target=i3GEOOLsnap.targets[0],tipos=["node","vertex","edge"],ntipos=tipos.length,i,temp,ativa=false;i3GEOOLsnap.deactivate();for(i=0;i<ntipos;i++){temp=$i("target_"+tipos[i]);target[tipos[i]]=temp.checked;if(temp.checked===true){ativa=true}temp=$i("target_"+tipos[i]+"Tolerance");target[tipos[i]+"Tolerance"]=temp.value}if(ativa===true){i3GEOOLsnap.activate()}},split:function(){i3GEOOLsplit.deactivate();var temp=$i("edge_split_toggle");if(temp.checked===true){i3GEOOLsplit.activate()}},processageo:function(operacao){if(operacao===""){return}var geosel=i3GEO.desenho.layergrafico.selectedFeatures,polis,linhas,pontos,temp;if(geosel.length>0){polis=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Polygon");linhas=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.LineString");pontos=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Point");temp=function(retorno){if(i3GEO.janela){i3GEO.janela.fechaAguarde("i3GEO.editorPoli");i3GEO.janela.fechaAguarde("i3GEO.editorLinhas");i3GEO.janela.fechaAguarde("i3GEO.editorPontos")}if(retorno!=""&&retorno.data&&retorno.data!=""&&operacao!="converteSHP"){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}if(operacao==="converteSHP"){i3GEO.atualiza();i3GEO.janela.minimiza("paneltemaativo")}};if(operacao==="union"&&!i3GEO.php){if(polis.length>0){temp=i3GEO.editorOL.uniaojts(polis);i3GEO.editorOL.substituiFeaturesSel(temp)}if(linhas.length>0){temp=i3GEO.editorOL.uniaojts(linhas);i3GEO.editorOL.substituiFeaturesSel(temp)}if(pontos.length>0){temp=i3GEO.editorOL.uniaojts(p);i3GEO.editorOL.substituiFeaturesSel(temp)}}else{if(polis.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos");i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao)}if(linhas.length>0){i3GEO.janela.abreAguarde("i3GEO.editorLinhas","Linhas");i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao)}if(pontos.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPontos","Pontos");i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao)}}return}else{alert("Selecione pelo menos dois elementos")}},uniaojts:function(geoms){var n=geoms.length,rwkt=new jsts.io.WKTReader(),wwkt=new jsts.io.WKTWriter(),fwkt=new OpenLayers.Format.WKT(),g,i,uniao;if(n>1){uniao=(fwkt.read(geoms[0]).geometry).toString();uniao=rwkt.read(uniao);for(i=1;i<=n;i++){g=(fwkt.read(geoms[i]).geometry).toString();uniao=uniao.union(rwkt.read(g))}uniao=wwkt.write(uniao);return[fwkt.read(uniao)]}else{return false}},retornaGeometriasTipo:function(features,tipo){var n=features.length,lista=[],i,temp;for(i=0;i<n;i++){temp=features[i].geometry;if(temp.CLASS_NAME==tipo){lista.push(temp)}}return lista},guardaBackup:function(){return;if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}else{i3GEO.editorOL.backup.removeFeatures(i3GEO.editorOL.backup.features)}i3GEO.editorOL.backup.addFeatures(i3GEO.desenho.layergrafico.features)},unselTodos:function(){var n,i;n=i3GEO.desenho.layergrafico.features.length;for(i=0;i<n;i++){i3GEO.desenho.layergrafico.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[i])}},unselTodosBackup:function(){var n,i;n=i3GEO.editorOL.backup.features.length;for(i=0;i<n;i++){i3GEO.editorOL.backup.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.backup.features[i])}},restauraBackup:function(){if(i3GEO.editorOL.backup.features.length>0){i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features)}if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},substituiFeaturesSel:function(wkt){i3GEO.editorOL.guardaBackup();try{var f,fwkt=new OpenLayers.Format.WKT();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);f=fwkt.read(wkt);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}catch(e){i3GEO.editorOL.restauraBackup()}},adicionaFeatureWkt:function(wkt,atributos){var f,fwkt=new OpenLayers.Format.WKT();if(atributos.externalGraphic&&atributos.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=atributos.externalGraphic;style_mark.graphicWidth=atributos.graphicWidth;style_mark.graphicHeight=atributos.graphicHeight;style_mark.fillOpacity=atributos.opacidade;f=fwkt.read(wkt);f["attributes"]=atributos;f["style"]=style_mark}else{f=fwkt.read(wkt);f["attributes"]=atributos}i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},flashFeaturesI:function(index){i3GEO.editorOL.flashFeatures([i3GEO.desenho.layergrafico.features[index]],0)},flashFeatures:function(features,index){if(!index){index=0}var current=features[index];if(current&&current.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(features[index],"select")}var prev=features[index-1];if(prev&&prev.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(prev,"default")}++index;if(index<=features.length){window.setTimeout(function(){i3GEO.editorOL.flashFeatures(features,index)},75)}},selFeature:function(index){i3GEO.editorOL.selbutton.select(i3GEO.desenho.layergrafico.features[index])},unselFeature:function(index){i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[index])},carregajts:function(funcao){if(i3GEO.configura){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}else{i3GEO.util.scriptTag("../pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}},trazParaFrente:function(){var features=i3GEO.desenho.layergrafico.selectedFeatures;if(features.length>0){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false});i3GEO.editorOL.backup.addFeatures(features);i3GEO.editorOL.unselTodosBackup();i3GEO.desenho.layergrafico.removeFeatures(features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}else{alert("Selecione pelo menos um elemento")}},pegaControle:function(classe){var n=i3GEO.editorOL.controles.length,i;for(i=0;i<n;i++){if(i3GEO.editorOL.controles[i].CLASS_NAME===classe){return i3GEO.editorOL.controles[i]}}return false},ativaLayerSwitcher:function(){var ls=i3GEO.editorOL.pegaControle("OpenLayers.Control.LayerSwitcher");if(ls){ls.maximizeDiv.click()}},desativaRodaDoMouse:function(){var controls=i3GEO.editorOL.mapa.getControlsByClass('OpenLayers.Control.Navigation');for(var i=0;i<controls.length;++i){controls[i].disableZoomWheel()}},google2wgs:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84=new OpenLayers.Projection("EPSG:4326"),proj900913=new OpenLayers.Projection("EPSG:900913");return obj.transform(proj900913,projWGS84)}else{return obj}}};
  1481 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",layergrafico:null,estilos:{"normal":{fillcolor:'255,0,0',linecolor:'0,0,0',linewidth:'2',circcolor:'255,255,255',textcolor:'100,100,100'},"palido":{fillcolor:'100,100,100',linecolor:'100,100,100',linewidth:'1',circcolor:'100,100,100',textcolor:'100,100,100'},"vermelho":{fillcolor:'100,100,100',linecolor:'255,0,0',linewidth:'1',circcolor:'255,50,0',textcolor:'200,200,200'},"verde":{fillcolor:'100,100,100',linecolor:'100,255,100',linewidth:'1',circcolor:'0,255,0',textcolor:'0,0,0'}},estilosOld:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){if(!i3GEO.desenho.layergrafico){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Graf",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,vertexRenderIntent:"vertex"});if(i3GEO.editorOL&&i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}}},criaContainerRichdraw:function(){i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c,pontosdistobj=i3GEO.analise.pontosdistobj;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){i3GEO.desenho.estiloPadrao=padrao;padrao=i3GEO.desenho.estilosOld[padrao];if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)}},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
  1482 +if(typeof(i3GEO)==='undefined'){var i3GEO={};navn=false;navm=false;$i=function(id){return document.getElementById(id)};app=navigator.appName.substring(0,1);if(app==='N'){navn=true}else{navm=true}OpenLayers.ImgPath="../pacotes/openlayers/img/";OpenLayers.Lang.setCode("pt-BR")}i3GEO.editorOL={simbologia:{opacidade:0.8,texto:"",fillColor:"250,180,15",strokeWidth:2,strokeColor:"250,150,0",pointRadius:4,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},backup:new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}),nomeFuncaoSalvar:"i3GEO.editorOL.salvaGeo()",e_oce:new OpenLayers.Layer.ArcGIS93Rest("ESRI Ocean Basemap","http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_ims:new OpenLayers.Layer.ArcGIS93Rest("ESRI Imagery World 2D","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_wsm:new OpenLayers.Layer.ArcGIS93Rest("ESRI World Street Map","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),ol_mma:new OpenLayers.Layer.WMS("Base cartogr&aacute;fica","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&",{layers:'baseraster',SRS:'EPSG:4618',FORMAT:'image/png'},{singleTile:false}),ol_wms:new OpenLayers.Layer.WMS("OpenLayers WMS","http://labs.metacarta.com/wms/vmap0",{layers:'basic'}),top_wms:new OpenLayers.Layer.WMS("Topon&iacute;mia MMA","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseref.map&",{layers:"base",FORMAT:'image/png'}),est_wms:new OpenLayers.Layer.WMS("Estados do Brasil","http://mapas.mma.gov.br/i3geo/ogc.php?tema=estadosl&",{layers:"estadosl",FORMAT:'image/png'}),fundo:"e_ims,e_wsm,ol_mma,ol_wms,top_wms,est_wms,e_oce",kml:[],layersIniciais:[],botoes:{'pan':true,'zoombox':true,'zoomtot':true,'zoomin':true,'zoomout':true,'legenda':true,'distancia':true,'area':true,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'listag':true,'corta':true,'apaga':true,'procura':true,'selecao':true,'salva':true,'ajuda':true,'propriedades':true,'fecha':false,'tools':true,'undo':false,'frente':false,'legenda':true,'rodadomouse':true},pontos:[],marca:"../pacotes/openlayers/img/marker-gold.png",controles:[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoomBar(),new OpenLayers.Control.LayerSwitcher({'ascending':false}),new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.MousePosition({'separator':' '}),new OpenLayers.Control.OverviewMap(),new OpenLayers.Control.KeyboardDefaults()],tiles:true,incluilayergrafico:true,ativalayerswitcher:false,ativarodadomouse:true,legendahtml:false,numzoom:12,maxext:"",mapext:new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081),mapa:"",inicia:function(){var single=false,alayers=[],fundo=(i3GEO.editorOL.fundo).split(","),nfundo=fundo.length,ncontroles=i3GEO.editorOL.controles.length,i,n;if(i3GEO.editorOL.tiles===false||i3GEO.editorOL.tiles==="false"){single=true}if(i3GEO.editorOL.ativalayerswitcher==="false"){i3GEO.editorOL.ativalayerswitcher=false}if(i3GEO.editorOL.ativalayerswitcher==="true"){i3GEO.editorOL.ativalayerswitcher=true}if(i3GEO.editorOL.ativarodadomouse==="false"){i3GEO.editorOL.ativarodadomouse=false}if(i3GEO.editorOL.ativarodadomouse==="true"){i3GEO.editorOL.ativarodadomouse=true}if(i3GEO.editorOL.legendahtml==="false"){i3GEO.editorOL.legendahtml=false}if(i3GEO.editorOL.legendahtml==="true"){i3GEO.editorOL.legendahtml=true}if(i3GEO.editorOL.incluilayergrafico==="false"){i3GEO.editorOL.incluilayergrafico=false}if(i3GEO.editorOL.incluilayergrafico==="true"){i3GEO.editorOL.incluilayergrafico=true}if(i3GEO.editorOL.incluilayergrafico===true){if(!i3GEO.desenho.layergrafico){i3GEO.editorOL.criaLayerGrafico()}}else{i3GEO.desenho.layergrafico="";i3GEO.editorOL.botoes.linha=false;i3GEO.editorOL.botoes.ponto=false;i3GEO.editorOL.botoes.poligono=false;i3GEO.editorOL.botoes.texto=false;i3GEO.editorOL.botoes.edita=false;i3GEO.editorOL.botoes.listag=false;i3GEO.editorOL.botoes.corta=false;i3GEO.editorOL.botoes.apaga=false;i3GEO.editorOL.botoes.selecao=false;i3GEO.editorOL.botoes.salva=false;i3GEO.editorOL.botoes.propriedades=false;i3GEO.editorOL.botoes.fecha=false;i3GEO.editorOL.botoes.tools=false;i3GEO.editorOL.botoes.undo=false;i3GEO.editorOL.botoes.frente=false}if(i3GEO.editorOL.mapa===""){alert("O objeto i3GEO.editorOL.mapa precisa ser criado com new OpenLayers.Map()");return}for(i=0;i<ncontroles;i++){i3GEO.editorOL.mapa.addControl(i3GEO.editorOL.controles[i])}if(i3GEO.editorOL.fundo!=""){for(i=nfundo-1;i>=0;i--){if(fundo[i]!=""){try{eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';");eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);");eval("i3GEO.editorOL."+fundo[i]+".singleTile = false;");eval("alayers.push(i3GEO.editorOL."+fundo[i]+");")}catch(e){if(alayers[0]){alayers[0].setVisibility(true)}}}}}i3GEO.editorOL.mapa.addLayers(alayers);if(i3GEO.editorOL.layersIniciais!==""){n=i3GEO.editorOL.layersIniciais.length;for(i=0;i<n;i++){i3GEO.editorOL.layersIniciais[i].singleTile=single;i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i])}}if(!i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}i3GEO.editorOL.adicionaKml();i3GEO.editorOL.adicionaMarcas();i3GEO.editorOL.coordenadas();i3GEO.editorOL.criaJanelaBusca();i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);if(i3GEO.editorOL.ativalayerswitcher===true){i3GEO.editorOL.ativaLayerSwitcher()}if(i3GEO.editorOL.ativarodadomouse===false){i3GEO.editorOL.desativaRodaDoMouse()}if(i3GEO.editorOL.numzoom!==""){i3GEO.editorOL.mapa.setOptions({numZoomLevels:i3GEO.editorOL.numzoom})}if(i3GEO.editorOL.maxext!==""){i3GEO.editorOL.mapa.setOptions({maxExtent:i3GEO.editorOL.maxext})}if(i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}},criaLayerGrafico:function(){i3GEO.desenho.openlayers.criaLayerGrafico()},layersLigados:function(){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,ins=[],i;for(i=0;i<nlayers;i++){if(layers[i].visibility===true){ins.push(layers[i])}}return ins},layersClonados:function(paramsLayers){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].params&&layers[i].params.CLONETMS===paramsLayers){return(layers[i])}}return false},layertms2wms:function(tms){var layer,url;url=tms.url.replace("&cache=sim","&DESLIGACACHE=sim");url=url.replace("&Z=${z}&X=${x}&Y=${y}","");layer=new OpenLayers.Layer.WMS(tms.layername+"_clone",url,{layers:tms.name,transparent:true},{gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:true,singleTile:true});return layer},removeClone:function(){var nome=i3GEO.editorOL.layerAtivo().layername+"_clone",busca=i3GEO.editorOL.mapa.getLayersByName(nome);if(busca.length>0){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.mapa.getLayersByName(camada.name)[0],false)}},coordenadas:function(){var idcoord=i3GEO.editorOL.mapa.getControlsBy("separator"," ");if(idcoord[0]){i3GEO.editorOL.mapa.events.register("mousemove",i3GEO.editorOL.mapa,function(e){var p,lonlat,d;if(navm){p=new OpenLayers.Pixel(e.x,e.y)}else{p=e.xy}lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(p);d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{$i(idcoord[0].id).innerHTML="Long: "+d[0]+"<br>Lat: "+d[1]}catch(e){}})}},criaJanelaBusca:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,ins,combo="<select id=i3GEOOLlistaTemasBusca ><option value=''>----</option>";for(i=0;i<nlayers;i++){combo+="<option value='"+i+"' >"+layers[i].name+"</option>"}combo+="</select>";ins="<div class=paragrafo >Tema:<br>"+combo;ins+="<br>Item:<br><span id=i3GEOOLcomboitens ></span>";ins+="<br>Procurar por:<br><input type=text size=20 id=i3GEOOLpalavraBusca >";ins+="<br><br><input type=button value='Procurar' id='i3GEOOLbotaoBusca' ></div>";ins+="<br>Resultado:<br><span id=i3GEOOLcomboresultado ></span>";try{YAHOO.namespace("procura.container");YAHOO.procura.container.panel=new YAHOO.widget.Panel("panelprocura",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.procura.container.panel.setHeader("Encontre no mapa");YAHOO.procura.container.panel.setBody(ins);YAHOO.procura.container.panel.setFooter("");YAHOO.procura.container.panel.render(document.body);YAHOO.procura.container.panel.center();document.getElementById("i3GEOOLbotaoBusca").onclick=function(){var layer=i3GEO.editorOL.layerAtivo(),item=document.getElementById("i3GEOOLbuscaItem").value,palavra=document.getElementById("i3GEOOLpalavraBusca").value;if(item===""||palavra===""){alert("Escolha o item e o texto de busca");return}i3GEO.editorOL.busca(layer,item,palavra,"i3GEOOLcomboresultado")};document.getElementById("i3GEOOLlistaTemasBusca").onchange=function(){i3GEO.editorOL.ativaTema(this.value);document.getElementById("i3GEOOLcomboitens").innerHTML="...";i3GEO.editorOL.listaItens(i3GEO.editorOL.layerAtivo(),"i3GEOOLcomboitens","i3GEOOLbuscaItem")}}catch(e){}},criaComboTemas:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,nometema="",temp,combo="<select id=i3GEOOLlistaTemasAtivos style=width:235px; >";for(i=0;i<nlayers;i++){nometema="";if(i3GEO.arvoreDeCamadas&&i3GEO.arvoreDeCamadas.CAMADAS){temp=i3GEO.arvoreDeCamadas.pegaTema(layers[i].name,"","name");if(temp!=""){nometema=temp.tema+" - "}}combo+="<option value='"+i+"' >"+nometema+layers[i].name+"</option>"}combo+="</select>";return combo},atualizaJanelaAtivaTema:function(){var combo=i3GEO.editorOL.criaComboTemas();YAHOO.temaativo.container.panel.setBody(combo);document.getElementById("i3GEOOLlistaTemasAtivos").onchange=function(){if(botaoIdentifica){botaoIdentifica.layers=[i3GEO.editorOL.layersLigados()[this.value]]}}},criaJanelaAtivaTema:function(){var temp;if(!document.getElementById("paneltemaativo")){YAHOO.namespace("temaativo.container");YAHOO.temaativo.container.panel=new YAHOO.widget.Panel("paneltemaativo",{zIndex:20000,iframe:true,width:"250px",visible:false,draggable:true,close:true});YAHOO.temaativo.container.panel.setBody("");if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.temaativo.container.panel.setHeader("Tema ativo<div id='paneltemaativo_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.temaativo.container.panel.setHeader("Tema ativo")}YAHOO.temaativo.container.panel.setFooter("");YAHOO.temaativo.container.panel.render(document.body);YAHOO.temaativo.container.panel.show();YAHOO.temaativo.container.panel.center();i3GEO.editorOL.atualizaJanelaAtivaTema();YAHOO.util.Event.addListener(YAHOO.temaativo.container.panel.close,"click",function(){i3GEOpanelEditor.deactivate();i3GEOpanelEditor.activate();if(i3GEO.eventos&&i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")>0){i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()")}});if(typeof i3GEO!=undefined&&i3GEO!=""){if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEO.editorOL.atualizaJanelaAtivaTema()")}}temp=$i("paneltemaativo_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("paneltemaativo")}}}else{YAHOO.temaativo.container.panel.show();i3GEO.editorOL.atualizaJanelaAtivaTema()}},ativaTema:function(id){document.getElementById("i3GEOOLlistaTemasAtivos").value=id},layerAtivo:function(){var id=document.getElementById("i3GEOOLlistaTemasAtivos");if(id){id=id.value}else{id=i3GEO.temaAtivo}if(id==""){return[]}else{return i3GEO.editorOL.layersLigados()[id]}},listaItens:function(layer,idonde,idobj){if(!layer){return}if(!layer.params){return}var u=layer.url+"&request=describefeaturetype&service=wfs&version=1.0.0";u+="&typename="+layer.params.LAYERS;document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.WFSDescribeFeatureType({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),prop=gml.featureTypes[0].properties,nprop=prop.length,i,combo="<select id="+idobj+" ><option value=''>----</option>";for(i=0;i<nprop;i++){combo+="<option value="+prop[i].name+" >"+prop[i].name+"</option>"}combo+="</select>";document.getElementById(idonde).innerHTML=combo},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},busca:function(layer,item,palavra,onde){document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";var u=layer.url+"&request=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layer.params.LAYERS;u+="&filter=<Filter><PropertyIsLike wildcard=* singleChar=. escape=! ><PropertyName>"+item+"</PropertyName><Literal>*"+palavra+"*</Literal></PropertyIsLike></Filter>";document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";document.getElementById(onde).innerHTML="...";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),ngml=gml.length,i,ins="<select onchange='i3GEO.editorOL.zoomPara(this.value)'>";ins+="<option value=''>---</option>";for(i=0;i<ngml;i++){eval("var valor = gml[i].data."+item);var bounds=gml[i].geometry.getBounds();bounds=bounds.toBBOX();ins+="<option value='"+bounds+"'>"+valor+"</option>"}ins+="</select>";document.getElementById(onde).innerHTML=ins},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},zoomPara:function(bbox){var b=new OpenLayers.Bounds.fromString(bbox);i3GEO.editorOL.mapa.zoomToExtent(b)},mostraLegenda:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,ins="",i;for(i=0;i<nlayers;i++){try{if(layers[i].isBaseLayer===false){var url=layers[i].getFullRequestString({"request":"getlegendgraphic"});if(i3GEO.editorOL.legendahtml===true){url=url.replace("image%2Fpng","text/html");ins+=layers[i].name+"<br><div id=legendaL_"+i+" ></div><br>";eval("var f = function(retorno){document.getElementById('legendaL_"+i+"').innerHTML = retorno.responseText;};");var config={method:"GET",url:url,callback:f};OpenLayers.Request.issue(config)}else{url=url.replace("LAYERS","LAYER");ins+=layers[i].name+"<br><img src='"+url+"' /><br>"}}}catch(e){}}if(!document.getElementById("panellegendaeditorOL")){YAHOO.namespace("legendaeditorOL.container");YAHOO.legendaeditorOL.container.panel=new YAHOO.widget.Panel("panellegendaeditorOL",{zIndex:20000,iframe:true,width:"auto",visible:false,draggable:true,close:true});YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.setHeader("Legenda");YAHOO.legendaeditorOL.container.panel.setFooter("");YAHOO.legendaeditorOL.container.panel.render(document.body);YAHOO.legendaeditorOL.container.panel.show();YAHOO.legendaeditorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close,"click",function(){})}else{YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.show()}},captura:function(lonlat){var layers=[i3GEO.editorOL.layerAtivo()],xy=lonlat.split(","),u=layers[0].url+"&REQUEST=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS;u=u.replace("&cache=sim","&DESLIGACACHE=sim");u=u.replace("&Z=${z}&X=${x}&Y=${y}","");xy[0]=xy[0]*1;xy[1]=xy[1]*1;var poligono=(xy[0]-0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1);u+="&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>";document.body.style.cursor="wait";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="wait"}OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}var i,n,f,fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText);n=gml.length;for(i=0;i<n;i++){f=gml[i];f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,registros:f["attributes"]}}i3GEO.desenho.layergrafico.addFeatures(gml)},failure:function(){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}alert("Erro")}})},salvaGeometrias:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="";if(n>0){if($i("panelsalvageometrias")){YAHOO.salvaGeometrias.container.panel=YAHOO.i3GEO.janela.manager.find("panelsalvageometrias");YAHOO.salvaGeometrias.container.panel.show();YAHOO.salvaGeometrias.container.panel.bringToTop()}else{try{YAHOO.namespace("salvaGeometrias.container");YAHOO.salvaGeometrias.container.panel=new YAHOO.widget.Panel("panelsalvageometrias",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.salvaGeometrias.container.panel.setHeader("Geometrias");YAHOO.salvaGeometrias.container.panel.setBody("");YAHOO.salvaGeometrias.container.panel.setFooter("");YAHOO.salvaGeometrias.container.panel.render(document.body);YAHOO.salvaGeometrias.container.panel.center();if(YAHOO.i3GEO.janela){YAHOO.i3GEO.janela.manager.register(YAHOO.salvaGeometrias.container.panel)}YAHOO.salvaGeometrias.container.panel.show()}catch(e){}}ins+="<p class=paragrafo >Foram encontrada(s) "+n+" geometria(s) selecionada(s) </p>";ins+="<p class=paragrafo ><a href='#' onclick='i3GEO.editorOL.listaGeometriasSel()' >Listar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='"+i3GEO.editorOL.nomeFuncaoSalvar+"' >Salvar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>";YAHOO.salvaGeometrias.container.panel.setBody(ins)}else{alert("Selecione pelo menos um elemento")}},exportarSHP:function(){i3GEO.editorOL.processageo("converteSHP")},listaGeometriasSel:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="",i,a,w,g;for(i=0;i<n;i++){g=geos[i];ins+="<b>Geometria: "+i+"</b><br>"+i3GEO.editorOL.google2wgs(g.geometry)+"<br><br>";ins+="<b>Atributos: "+i+"</b><br>";a=g.attributes;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}if(g.attributes.registros){ins+="<b>Registros: "+i+"</b><br>";a=g.attributes.registros;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}}}w=window.open();w.document.write(ins);w.document.close()},testeSalvar:function(){alert("Funcao nao disponivel. Defina o nome da funcao em i3GEO.editorOL.nomeFuncaoSalvar ")},salvaGeo:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,funcaoOK=function(){if(geos[0].geometry){var registros="",valorunico="",nometema=$i("editorOLcomboTemaEditavel").value,key="",tema,redesenha,p,g=i3GEO.editorOL.google2wgs(geos[0].geometry);if(nometema==""){return}tema=i3GEO.arvoreDeCamadas.pegaTema(nometema,"","name");if(geos[0].attributes.registros){registros=geos[0].attributes.registros;for(key in registros){if(registros[key]&&key==tema.colunaidunico){valorunico=registros[key]}}}redesenha=function(retorno){i3GEO.janela.fechaAguarde("aguardeSalvaPonto");i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);i3GEO.Interface.atualizaTema("",nometema)};i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardeSalvaPonto","Adicionando...");i3GEO.janela.AGUARDEMODAL=false;if(valorunico==""){p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&tema="+nometema+"&wkt="+g)}else{p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=atualizaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&idunico="+valorunico+"&tema="+nometema+"&wkt="+g)}}},funcaoCombo=function(obj){$i("editorOLondeComboTemaEditavel").innerHTML=obj.dados},texto="Salvar no tema:<br><div id=editorOLondeComboTemaEditavel ></div><br><br>";if(n!=1){i3GEO.janela.tempoMsg("Selecione apenas uma figura")}else{i3GEO.janela.confirma(texto,300,"Salva","Cancela",funcaoOK);i3GEO.util.comboTemas("editorOLcomboTemaEditavel",funcaoCombo,"editorOLondeComboTemaEditavel","",false,"editavel")}},criaBotoes:function(botoes){var sketchSymbolizers={"Point":{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},"Line":{strokeWidth:3,strokeOpacity:1,strokeColor:"#666666",strokeDashstyle:"dash"},"Polygon":{strokeWidth:2,strokeOpacity:1,strokeColor:"#666666",fillColor:"white",fillOpacity:0.3}},style=new OpenLayers.Style(),styleMap=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:3}},{extendDefault:false}),adiciona=false,button,controles=[];style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEOpanelEditor=new OpenLayers.Control.Panel({displayClass:"olControlEditingToolbar1 noprint",saveState:false,activateControl:function(c){this.deactivate();this.activate();try{i3GEO.editorOL.ModifyFeature.deactivate();if(i3GEO&&i3GEO.barraDeBotoes){i3GEO.barraDeBotoes.ativaPadrao()}}catch(e){}if(!c.trigger){c.activate()}else{c.trigger.call()}}});if(botoes.procura===true){button=new OpenLayers.Control.Button({displayClass:"editorOLprocura",trigger:function(){YAHOO.procura.container.panel.show()},title:"procura",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.pan===true){controles.push(new OpenLayers.Control.Navigation({title:"deslocar",displayClass:"editorOLpan",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoombox===true){controles.push(new OpenLayers.Control.ZoomBox({title:"zoombox",displayClass:"editorOLzoombox",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoomtot===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomtot",trigger:function(){if(i3GEO.editorOL.mapext&&i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}},title:"ajusta extensao",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomin===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomin",trigger:function(){i3GEO.editorOL.mapa.zoomIn()},title:"aproxima",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomout===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomout",trigger:function(){i3GEO.editorOL.mapa.zoomOut()},title:"afasta",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.legenda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlegenda",trigger:function(){i3GEO.editorOL.mostraLegenda()},title:"legenda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.distancia===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLdistancia",title:"distancia",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units,measure=event.measure;alert("Dist&acirc;ncia: "+measure.toFixed(3)+" "+units)}});controles.push(button);adiciona=true}if(botoes.area===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLarea",title:"area",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units;var measure=event.measure;alert("&Aacute;rea: "+measure.toFixed(3)+" "+units+" quadrados")}});controles.push(button);adiciona=true}if(botoes.identifica===true){botaoIdentifica=new OpenLayers.Control.WMSGetFeatureInfo({maxFeatures:1,infoFormat:'text/plain',layers:[i3GEO.editorOL.layerAtivo()],queryVisible:true,title:"identifica",type:OpenLayers.Control.TYPE_TOOL,displayClass:"editorOLidentifica",eventListeners:{getfeatureinfo:function(event){var lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),lonlattexto="<hr>",formata;if(botoes.linha===true||botoes.ponto===true||botoes.poligono===true||botoes.edita===true){lonlattexto+="<pre><span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>edita geometria</span></pre><br>"}formata=function(texto){var temp,temp1,n,i,f=[],textoN=texto.split(":");try{if(textoN.length>1){temp=textoN[2].replace(/\n\r/g,"");temp=temp.replace(/'/g,"");temp=temp.replace(/\n/g,"|");temp=temp.replace(/_/g," ");temp=temp.replace(/=/g,":");temp=temp.split("|");n=temp.length;for(i=0;i<n;i++){temp1=temp[i].replace(/^\s+/,"");temp1=temp1.replace(/\s+$/,"");if(temp1!="")f.push(temp1)}texto=f.join("<br><br>")}}catch(e){}return texto};i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("chicken",i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),null,"<div style=text-align:left >"+lonlattexto+"<pre>"+formata(event.text)+"</pre></div>",null,true));i3GEO.editorOL.removeClone()},beforegetfeatureinfo:function(event){var ativo=[i3GEO.editorOL.layerAtivo()];if(ativo[0].CLASS_NAME=="OpenLayers.Layer.TMS"||ativo[0].CLASS_NAME=="OpenLayers.Layer.OSM"){ativo=[i3GEO.editorOL.layertms2wms(ativo[0])]}ativo[0].projection=new OpenLayers.Projection("EPSG:4326");event.object.layers=ativo;botaoIdentifica.layers=ativo;botaoIdentifica.url=ativo[0].url},activate:function(){i3GEO.editorOL.criaJanelaAtivaTema()}}});controles.push(botaoIdentifica);adiciona=true}if(botoes.linha===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{displayClass:"editorOLlinha",title:"digitalizar linha",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.ponto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLponto",title:"digitalizar ponto",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f,style_mark;if(i3GEO.editorOL.simbologia.externalGraphic!=""){style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=i3GEO.editorOL.simbologia.externalGraphic;style_mark.graphicWidth=i3GEO.editorOL.simbologia.graphicWidth;style_mark.graphicHeight=i3GEO.editorOL.simbologia.graphicHeight;style_mark.fillOpacity=i3GEO.editorOL.simbologia.opacidade;f=new OpenLayers.Feature.Vector(feature,null,style_mark)}else{f=new OpenLayers.Feature.Vector(feature)}f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,externalGraphic:i3GEO.editorOL.simbologia.externalGraphic,graphicHeight:i3GEO.editorOL.simbologia.graphicHeight,graphicWidth:i3GEO.editorOL.simbologia.graphicWidth};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.poligono===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLpoligono",title:"digitalizar poligono",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.texto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLtexto",title:"incluir texto",type:OpenLayers.Control.TYPE_TOOL,persist:true,callbacks:{done:function(feature){var texto=window.prompt("Texto",""),label=new OpenLayers.Feature.Vector(feature);label["attributes"]={opacidade:0.1,fillColor:"white",strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,texto:texto,pointRadius:2,graphicName:"square",strokeColor:"black",fontColor:i3GEO.editorOL.simbologia.fontColor,fontSize:i3GEO.editorOL.simbologia.fontSize,fontFamily:"Arial",fontWeight:"bold",labelAlign:"rt"};if(texto&&texto!==""){i3GEO.desenho.layergrafico.addFeatures([label])}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.edita===true&&botoes.corta===true&&i3GEO.php){i3GEO.editorOL.CortaFeature=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLcorta",title:"corta figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length!=1){alert("Selecione primeiro um elemento para ser cortado");i3GEO.editorOL.CortaFeature.deactivate()}else{i3GEO.editorOL.CortaFeature.activate()}},callbacks:{done:function(feature){var temp,sel=i3GEO.desenho.layergrafico.selectedFeatures[0].geometry,corta=feature;temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.cortador");if(retorno!=""&&retorno.data&&retorno.data!=""){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}};i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando");i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference")}}});controles.push(i3GEO.editorOL.CortaFeature);adiciona=true}if(botoes.edita===true){i3GEO.editorOL.ModifyFeature=new OpenLayers.Control.ModifyFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLedita",title:"modifica figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,mode:OpenLayers.Control.ModifyFeature.RESHAPE,standalone:false,createVertices:true,styleMap:"default",vertexRenderIntent:"vertex"});controles.push(i3GEO.editorOL.ModifyFeature);adiciona=true}if(botoes.edita===true&&botoes.listag===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlistag",trigger:function(){i3GEO.editorOL.listaGeometrias()},title:"lista geometrias",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.frente===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfrente",trigger:function(){i3GEO.editorOL.trazParaFrente();if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},title:"traz para frente",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.tools===true&&i3GEO.php){button=new OpenLayers.Control.Button({displayClass:"editorOLtools",trigger:function(){if(i3GEO.php){i3GEO.editorOL.ferramentas()}else{i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()")}},title:"ferramentas",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.selecao===true){i3GEO.editorOL.selbutton=new OpenLayers.Control.SelectFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLselecao",title:"seleciona elemento",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,multiple:false,hover:false,toggleKey:"ctrlKey",multipleKey:"shiftKey",box:false});controles.push(i3GEO.editorOL.selbutton);adiciona=true}if(botoes.apaga===true){button=new OpenLayers.Control.Button({displayClass:"editorOLapaga",trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length>0){var x=window.confirm("Exclui os elementos selecionados?");if(x){i3GEO.editorOL.guardaBackup();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}else{alert("Selecione pelo menos um elemento")}},title:"apaga selecionados",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.propriedades===true){button=new OpenLayers.Control.Button({displayClass:"editorOLpropriedades",trigger:function(){i3GEO.editorOL.propriedades()},title:"propriedades",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.salva===true){button=new OpenLayers.Control.Button({displayClass:"editorOLsalva",trigger:function(){i3GEO.editorOL.salvaGeometrias()},title:"salva",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.ajuda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLajuda",trigger:function(){try{window.open(i3GEO.configura.locaplic+"/mashups/openlayers_ajuda.php")}catch(e){window.open("openlayers_ajuda.php")}},title:"ajuda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.fecha===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfecha",trigger:function(){var temp=window.confirm("Remove a edicao?");if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}i3GEOpanelEditor.destroy();try{YAHOO.temaativo.container.panel.destroy()}catch(e){}try{YAHOO.procura.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.listaGeometrias.panel.destroy()}catch(e){}try{YAHOO.editorOL.ferramentas.panel.destroy()}catch(e){}try{YAHOO.legendaeditorOL.container.panel.destroy()}catch(e){}try{YAHOO.salvaGeometrias.container.panel.destroy()}catch(e){}if(temp===true){try{if(i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.removeLayer(i3GEO.desenho.layergrafico);delete(i3GEO.desenho.layergrafico)}if(i3GEO.editorOL.backup){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.backup);delete(i3GEO.editorOL.backup)}}catch(e){}}},title:"fecha editor",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}i3GEOOLsnap=new OpenLayers.Control.Snapping({layer:i3GEO.desenho.layergrafico});i3GEOOLsplit=new OpenLayers.Control.Split({layer:i3GEO.desenho.layergrafico,source:i3GEO.desenho.layergrafico,tolerance:0.0001,eventListeners:{beforesplit:function(event){i3GEO.editorOL.guardaBackup()},aftersplit:function(event){i3GEO.editorOL.flashFeatures(event.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}});if(adiciona===true){i3GEOpanelEditor.addControls(controles);i3GEO.editorOL.mapa.addControl(i3GEOpanelEditor)}},mudaSimbolo:function(estilo,id){var valor=$i(id).value,geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,i;i3GEO.editorOL.simbologia[estilo]=valor;for(i=0;i<n;i++){geos[i].attributes[estilo]=valor;geos[i].style[estilo]=valor}},adicionaMarcas:function(){if(i3GEO.editorOL.pontos.length===0){return}var SHADOW_Z_INDEX=10,MARKER_Z_INDEX=11,layer=new OpenLayers.Layer.Vector("pontos",{styleMap:new OpenLayers.StyleMap({externalGraphic:i3GEO.editorOL.marca,backgroundGraphic:"../pacotes/openlayers/img/marker_shadow.png",backgroundXOffset:0,backgroundYOffset:-7,graphicZIndex:MARKER_Z_INDEX,backgroundGraphicZIndex:SHADOW_Z_INDEX,pointRadius:10}),isBaseLayer:false,rendererOptions:{yOrdering:true},displayInLayerSwitcher:true,visibility:true}),index,x=[],y=[],features=[];for(index=0;index<i3GEO.editorOL.pontos.length;index=index+2){x.push(i3GEO.editorOL.pontos[index]);y.push(i3GEO.editorOL.pontos[index+1])}for(index=0;index<x.length;index++){features.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x[index],y[index])))}layer.addFeatures(features);i3GEO.editorOL.mapa.addLayer(layer)},adicionaKml:function(){var temp,n,i,id,url;n=i3GEO.editorOL.kml.length;for(i=0;i<n;i++){id="kml"+i;url=i3GEO.editorOL.kml[i];eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3GEO.editorOL.mapa.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,g,html="";if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3GEO.editorOL.mapa.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(var j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}}},propriedades:function(){if(!document.getElementById("panelpropriedadesEditor")){YAHOO.namespace("editorOL.container");YAHOO.editorOL.container.panel=new YAHOO.widget.Panel("panelpropriedadesEditor",{zIndex:20000,iframe:true,width:"350px",height:"250px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo ><b>Estilos (utilize a cor no formato r,g,b):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td>Cor do contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeColor\',\'i3GEOEditorOLcorContorno\')" type="text" style="cursor:text" id="i3GEOEditorOLcorContorno" size="12" value="'+i3GEO.editorOL.simbologia.strokeColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorContorno\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor do preenchimento</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fillColor\',\'i3GEOEditorOLcorPre\')" type="text" style="cursor:text" id="i3GEOEditorOLcorPre" size="12" value="'+i3GEO.editorOL.simbologia.fillColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorPre\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontColor\',\'i3GEOEditorOLcorFonte\')" type="text" style="cursor:text" id="i3GEOEditorOLcorFonte" size="12" value="'+i3GEO.editorOL.simbologia.fontColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorFonte\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Tamanho da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontSize\',\'i3GEOEditorOLfontsize\')" type="text" style="cursor:text" id="i3GEOEditorOLfontsize" size="3" value="'+i3GEO.editorOL.simbologia.fontSize+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Opacidade (de 0 a 1)</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'opacidade\',\'i3GEOEditorOLopacidade\')" type="text" style="cursor:text" id="i3GEOEditorOLopacidade" size="3" value="'+i3GEO.editorOL.simbologia.opacidade+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura da linha/contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeWidth\',\'i3GEOEditorOLlarguraLinha\')" type="text" style="cursor:text" id="i3GEOEditorOLlarguraLinha" size="2" value="'+i3GEO.editorOL.simbologia.strokeWidth+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Url de uma figura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'externalGraphic\',\'i3GEOEditorOLexternalGraphic\')" type="text" style="cursor:text" id="i3GEOEditorOLexternalGraphic" size="22" value="'+i3GEO.editorOL.simbologia.externalGraphic+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura e altura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicWidth\',\'i3GEOEditorOLgraphicWidth\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicWidth" size="4" value="'+i3GEO.editorOL.simbologia.graphicWidth+'" />&nbsp;<input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicHeight\',\'i3GEOEditorOLgraphicHeight\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicHeight" size="4" value="'+i3GEO.editorOL.simbologia.graphicHeight+'" /></td><td></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Ajusta n&oacute; em edi&ccedil;&atilde;o para o(a):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td></td><td>n&oacute</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_node" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_nodeTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_vertex" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_vertexTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Divide intersec&ccedil;&atilde;o ao digitalizar</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.split()" type="checkbox" id="edge_split_toggle" /></td><td>borda</td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Opera&ccedil;&atilde;o ativada pelo bot&atilde;o de modifica&ccedil;&atilde;o da figura</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input checked style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESHAPE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera figura</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESIZE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera tamanho</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.ROTATE;" type="radio" name=i3geoOLtipoEdita /></td><td>rotaciona</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.DRAG;" type="radio" name=i3geoOLtipoEdita /></td><td>desloca</td>'+' </tr>'+'</table>';YAHOO.editorOL.container.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.container.panel.setHeader("Propriedades<div id='panelpropriedadesEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.container.panel.setHeader("Propriedades")}YAHOO.editorOL.container.panel.setFooter("");YAHOO.editorOL.container.panel.render(document.body);YAHOO.editorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close,"click",function(){});temp=$i("panelpropriedadesEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelpropriedadesEditor")}}}YAHOO.editorOL.container.panel.show();temp=$i("panelpropriedadesEditor").getElementsByTagName("div");if(temp&&temp[2]){temp[2].style.overflow="auto"}},listaGeometrias:function(){if(!document.getElementById("panellistagEditor")){YAHOO.namespace("editorOL.listaGeometrias");YAHOO.editorOL.listaGeometrias.panel=new YAHOO.widget.Panel("panellistagEditor",{zIndex:20000,iframe:true,width:"320px",visible:false,draggable:true,close:true});if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias <div id='panellistagEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias")}YAHOO.editorOL.listaGeometrias.panel.setFooter("");YAHOO.editorOL.listaGeometrias.panel.render(document.body);YAHOO.editorOL.listaGeometrias.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.listaGeometrias.panel.close,"click",function(){YAHOO.editorOL.listaGeometrias.panel.destroy()});temp=$i("panellistagEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panellistagEditor")}}}else{YAHOO.editorOL.listaGeometrias.panel.render(document.body)}var g,temp,geos=i3GEO.desenho.layergrafico.features,n=geos.length,ins="<table class=lista4 >";ins+="<tr><td><i>Geometrias</i></td><td><i>Op&ccedil;&otilde;es</i></td><td></td><td></td></tr>";while(n>0){n-=1;g=geos[n].geometry;ins+="<tr><td>"+g.CLASS_NAME+"</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.selFeature("+n+")'>seleciona</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.unselFeature("+n+")'>limpa</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.flashFeaturesI("+n+")'>brilha</td></tr>"}ins+="</table>";if(geos.length===0){ins="Nenhum elemento gr&aacute;fico encontrado. Utilize as op&ccedil;&otilde;es de cria&ccedil;&atilde;o de geometrias."}YAHOO.editorOL.listaGeometrias.panel.show();if(i3GEO.configura){temp=$i("panellistagEditor").getElementsByTagName("div")[2]}else{temp=$i("panellistagEditor").getElementsByTagName("div")[1]}temp.style.overflow="auto";temp.style.height="100px";temp.innerHTML=ins},ferramentas:function(){if(!document.getElementById("panelferramentasEditor")){YAHOO.namespace("editorOL.ferramentas");YAHOO.editorOL.ferramentas.panel=new YAHOO.widget.Panel("panelferramentasEditor",{zIndex:20000,iframe:true,width:"300px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo >Opera&ccedil;&otilde;es sobre as figuras selecionadas:</p>'+'<select onchange="i3GEO.editorOL.processageo(this.value);this.value = \'\'" >'+' <option value="">---</option>'+' <option value=union >Uni&atilde;o</option>';if(i3GEO.php){ins+=' <option value=intersection >Intersec&ccedil;&atilde;o</option>'+' <option value=convexhull >Convex hull</option>'+' <option value=boundary >Bordas</option>'+' <option value=difference >Diferen&ccedil;a</option>'+' <option value=symdifference >Diferen&ccedil;a sim&eacute;trica</option>'}ins+='</select>'+'<br><br><a class=paragrafo href=# onclick="i3GEO.desenho.layergrafico.destroyFeatures()" >Apaga tudo</a>';YAHOO.editorOL.ferramentas.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas <div id='panelferramentasEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas")}YAHOO.editorOL.ferramentas.panel.setFooter("");YAHOO.editorOL.ferramentas.panel.render(document.body);YAHOO.editorOL.ferramentas.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.ferramentas.panel.close,"click",function(){});temp=$i("panelferramentasEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelferramentasEditor")}}}else{YAHOO.editorOL.ferramentas.panel.render(document.body)}YAHOO.editorOL.ferramentas.panel.show()},snap:function(){var target=i3GEOOLsnap.targets[0],tipos=["node","vertex","edge"],ntipos=tipos.length,i,temp,ativa=false;i3GEOOLsnap.deactivate();for(i=0;i<ntipos;i++){temp=$i("target_"+tipos[i]);target[tipos[i]]=temp.checked;if(temp.checked===true){ativa=true}temp=$i("target_"+tipos[i]+"Tolerance");target[tipos[i]+"Tolerance"]=temp.value}if(ativa===true){i3GEOOLsnap.activate()}},split:function(){i3GEOOLsplit.deactivate();var temp=$i("edge_split_toggle");if(temp.checked===true){i3GEOOLsplit.activate()}},processageo:function(operacao){if(operacao===""){return}var geosel=i3GEO.desenho.layergrafico.selectedFeatures,polis,linhas,pontos,temp;if(geosel.length>0){polis=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Polygon");linhas=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.LineString");pontos=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Point");temp=function(retorno){if(i3GEO.janela){i3GEO.janela.fechaAguarde("i3GEO.editorPoli");i3GEO.janela.fechaAguarde("i3GEO.editorLinhas");i3GEO.janela.fechaAguarde("i3GEO.editorPontos")}if(retorno!=""&&retorno.data&&retorno.data!=""&&operacao!="converteSHP"){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}if(operacao==="converteSHP"){i3GEO.atualiza();i3GEO.janela.minimiza("paneltemaativo")}};if(operacao==="union"&&!i3GEO.php){if(polis.length>0){temp=i3GEO.editorOL.uniaojts(polis);i3GEO.editorOL.substituiFeaturesSel(temp)}if(linhas.length>0){temp=i3GEO.editorOL.uniaojts(linhas);i3GEO.editorOL.substituiFeaturesSel(temp)}if(pontos.length>0){temp=i3GEO.editorOL.uniaojts(p);i3GEO.editorOL.substituiFeaturesSel(temp)}}else{if(polis.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos");i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao)}if(linhas.length>0){i3GEO.janela.abreAguarde("i3GEO.editorLinhas","Linhas");i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao)}if(pontos.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPontos","Pontos");i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao)}}return}else{alert("Selecione pelo menos dois elementos")}},uniaojts:function(geoms){var n=geoms.length,rwkt=new jsts.io.WKTReader(),wwkt=new jsts.io.WKTWriter(),fwkt=new OpenLayers.Format.WKT(),g,i,uniao;if(n>1){uniao=(fwkt.read(geoms[0]).geometry).toString();uniao=rwkt.read(uniao);for(i=1;i<=n;i++){g=(fwkt.read(geoms[i]).geometry).toString();uniao=uniao.union(rwkt.read(g))}uniao=wwkt.write(uniao);return[fwkt.read(uniao)]}else{return false}},retornaGeometriasTipo:function(features,tipo){var n=features.length,lista=[],i,temp;for(i=0;i<n;i++){temp=features[i].geometry;if(temp.CLASS_NAME==tipo){lista.push(temp)}}return lista},guardaBackup:function(){return;if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}else{i3GEO.editorOL.backup.removeFeatures(i3GEO.editorOL.backup.features)}i3GEO.editorOL.backup.addFeatures(i3GEO.desenho.layergrafico.features)},unselTodos:function(){var n,i;n=i3GEO.desenho.layergrafico.features.length;for(i=0;i<n;i++){i3GEO.desenho.layergrafico.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[i])}},unselTodosBackup:function(){var n,i;n=i3GEO.editorOL.backup.features.length;for(i=0;i<n;i++){i3GEO.editorOL.backup.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.backup.features[i])}},restauraBackup:function(){if(i3GEO.editorOL.backup.features.length>0){i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features)}if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},substituiFeaturesSel:function(wkt){i3GEO.editorOL.guardaBackup();try{var f,fwkt=new OpenLayers.Format.WKT();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);f=fwkt.read(wkt);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}catch(e){i3GEO.editorOL.restauraBackup()}},adicionaFeatureWkt:function(wkt,atributos){var f,fwkt=new OpenLayers.Format.WKT();if(atributos.externalGraphic&&atributos.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=atributos.externalGraphic;style_mark.graphicWidth=atributos.graphicWidth;style_mark.graphicHeight=atributos.graphicHeight;style_mark.fillOpacity=atributos.opacidade;f=fwkt.read(wkt);f["attributes"]=atributos;f["style"]=style_mark}else{f=fwkt.read(wkt);f["attributes"]=atributos}i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},flashFeaturesI:function(index){i3GEO.editorOL.flashFeatures([i3GEO.desenho.layergrafico.features[index]],0)},flashFeatures:function(features,index){if(!index){index=0}var current=features[index];if(current&&current.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(features[index],"select")}var prev=features[index-1];if(prev&&prev.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(prev,"default")}++index;if(index<=features.length){window.setTimeout(function(){i3GEO.editorOL.flashFeatures(features,index)},75)}},selFeature:function(index){i3GEO.editorOL.selbutton.select(i3GEO.desenho.layergrafico.features[index])},unselFeature:function(index){i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[index])},carregajts:function(funcao){if(i3GEO.configura){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}else{i3GEO.util.scriptTag("../pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}},trazParaFrente:function(){var features=i3GEO.desenho.layergrafico.selectedFeatures;if(features.length>0){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false});i3GEO.editorOL.backup.addFeatures(features);i3GEO.editorOL.unselTodosBackup();i3GEO.desenho.layergrafico.removeFeatures(features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}else{alert("Selecione pelo menos um elemento")}},pegaControle:function(classe){var n=i3GEO.editorOL.controles.length,i;for(i=0;i<n;i++){if(i3GEO.editorOL.controles[i].CLASS_NAME===classe){return i3GEO.editorOL.controles[i]}}return false},ativaLayerSwitcher:function(){var ls=i3GEO.editorOL.pegaControle("OpenLayers.Control.LayerSwitcher");if(ls){ls.maximizeDiv.click()}},desativaRodaDoMouse:function(){var controls=i3GEO.editorOL.mapa.getControlsByClass('OpenLayers.Control.Navigation');for(var i=0;i<controls.length;++i){controls[i].disableZoomWheel()}},google2wgs:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84=new OpenLayers.Projection("EPSG:4326"),proj900913=new OpenLayers.Projection("EPSG:900913");return obj.transform(proj900913,projWGS84)}else{return obj}}};
... ...
mashups/openlayers_compacto.js.php
... ... @@ -41,7 +41,7 @@ u.style.height=&quot;1px&quot;;u.style.width=&quot;1px&quot;;u.style.position=&quot;absolute&quot;;u.style.lef
41 41 setTimeout(function(){a.removeClass(v,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(j,i){YAHOO.widget.Dialog.superclass.constructor.call(this,j,i);};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},c={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy();}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false);}}}while(j--);}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(i){if(i!="form"&&i!="async"&&i!="none"&&i!="manual"){return false;}else{return true;}}});this.cfg.addProperty(c.POST_DATA.key,{value:c.POST_DATA.value});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes});},initEvents:function(){a.superclass.initEvents.call(this);var i=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=i;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=i;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=i;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=i;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=i;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=i;},init:function(j,i){a.superclass.init.call(this,j);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(i){this.cfg.applyConfig(i,true);}this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a);},doSubmit:function(){var q=YAHOO.util.Connect,r=this.form,l=false,o=false,s,n,m,j;switch(this.cfg.getProperty("postmethod")){case"async":s=r.elements;n=s.length;if(n>0){m=n-1;do{if(s[m].type=="file"){l=true;break;}}while(m--);}if(l&&YAHOO.env.ua.ie&&this.isSecure){o=true;}j=this._getFormAttributes(r);q.setForm(r,l,o);var k=this.cfg.getProperty("postdata");var p=q.asyncRequest(j.method,j.action,this.callback,k);this.asyncSubmitEvent.fire(p);break;case"form":r.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_getFormAttributes:function(k){var i={method:null,action:null};if(k){if(k.getAttributeNode){var j=k.getAttributeNode("action");var l=k.getAttributeNode("method");if(j){i.action=j.value;}if(l){i.method=l.value;}}else{i.action=k.getAttribute("action");i.method=k.getAttribute("method");}}i.method=(f.isString(i.method)?i.method:"POST").toUpperCase();i.action=f.isString(i.action)?i.action:"";return i;},registerForm:function(){var i=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==i&&e.isAncestor(this.element,this.form)){return;}else{b.purgeElement(this.form);this.form=null;}}if(!i){i=document.createElement("form");i.name="frm_"+this.id;this.body.appendChild(i);}if(i){this.form=i;b.on(i,"submit",this._submitHandler,this,true);}},_submitHandler:function(i){b.stopEvent(i);this.submit();this.form.blur();},setTabLoop:function(i,j){i=i||this.firstButton;j=j||this.lastButton;a.superclass.setTabLoop.call(this,i,j);},_setTabLoop:function(i,j){i=i||this.firstButton;j=this.lastButton||j;this.setTabLoop(i,j);},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break;}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break;}}}},configClose:function(j,i,k){a.superclass.configClose.apply(this,arguments);},_doClose:function(i){b.preventDefault(i);this.cancel();},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text,type:u.type});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q;}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this});}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)});}}this._aButtons[this._aButtons.length]=k;}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q;}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true);}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this));}}p.appendChild(q);this._aButtons[this._aButtons.length]=q;}u.htmlButton=q;if(m===0){this.firstButton=q;}if(m==(r-1)){this.lastButton=q;}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j);}this.buttonSpan=p;}else{p=this.buttonSpan;
42 42 j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.changeContentEvent.fire();},getButtons:function(){return this._aButtons||null;},focusFirst:function(k,i,n){var j=this.firstFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.firstElement){j=this.firstElement;}}if(j){try{j.focus();m=true;}catch(l){}}else{if(this.defaultHtmlButton){m=this.focusDefaultButton();}else{m=this.focusFirstButton();}}return m;},focusLast:function(k,i,n){var o=this.cfg.getProperty("buttons"),j=this.lastFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.lastElement){j=this.lastElement;}}if(o&&f.isArray(o)){m=this.focusLastButton();}else{if(j){try{j.focus();m=true;}catch(l){}}}return m;},_getButton:function(j){var i=YAHOO.widget.Button;if(i&&j&&j.nodeName&&j.id){j=i.getButton(j.id)||j;}return j;},focusDefaultButton:function(){var i=this._getButton(this.defaultHtmlButton),k=false;if(i){try{i.focus();k=true;}catch(j){}}return k;},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur();}catch(m){}}}}while(j--);}}},focusFirstButton:function(){var m=this.cfg.getProperty("buttons"),k,i,l=false;if(m&&f.isArray(m)){k=m[0];if(k){i=this._getButton(k.htmlButton);if(i){try{i.focus();l=true;}catch(j){}}}}return l;},focusLastButton:function(){var n=this.cfg.getProperty("buttons"),j,l,i,m=false;if(n&&f.isArray(n)){j=n.length;if(j>0){l=n[(j-1)];if(l){i=this._getButton(l.htmlButton);if(i){try{i.focus();m=true;}catch(k){}}}}}return m;},configPostMethod:function(j,i,k){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var A=this.form,k,t,w,m,u,r,q,j,x,l,y,B,p,C,o,z,v;function s(n){var i=n.tagName.toUpperCase();return((i=="INPUT"||i=="TEXTAREA"||i=="SELECT")&&n.name==m);}if(A){k=A.elements;t=k.length;w={};for(z=0;z<t;z++){m=k[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;j=u.tagName.toUpperCase();switch(j){case"INPUT":if(q=="checkbox"){w[m]=u.checked;}else{if(q!="radio"){w[m]=u.value;}}break;case"TEXTAREA":w[m]=u.value;break;case"SELECT":x=u.options;l=x.length;y=[];for(v=0;v<l;v++){B=x[v];if(B.selected){o=B.attributes.value;y[y.length]=(o&&o.specified)?B.value:B.text;}}w[m]=y;break;}}else{q=u[0].type;switch(q){case"radio":for(v=0;v<r;v++){p=u[v];if(p.checked){w[m]=p.value;break;}}break;case"checkbox":y=[];for(v=0;v<r;v++){C=u[v];if(C.checked){y[y.length]=C.value;}}w[m]=y;break;}}}}}return w;},destroy:function(i){d.call(this);this._aButtons=null;var j=this.element.getElementsByTagName("form"),k;if(j.length>0){k=j[0];if(k){b.purgeElement(k);if(k.parentNode){k.parentNode.removeChild(k);}this.form=null;}}a.superclass.destroy.call(this,i);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(e,d){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,e,d);};var c=YAHOO.util.Dom,b=YAHOO.widget.SimpleDialog,a={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};b.ICON_BLOCK="blckicon";b.ICON_ALARM="alrticon";b.ICON_HELP="hlpicon";b.ICON_INFO="infoicon";b.ICON_WARN="warnicon";b.ICON_TIP="tipicon";b.ICON_CSS_CLASSNAME="yui-icon";b.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(b,YAHOO.widget.Dialog,{initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);this.cfg.addProperty(a.ICON.key,{handler:this.configIcon,value:a.ICON.value,suppressEvent:a.ICON.suppressEvent});this.cfg.addProperty(a.TEXT.key,{handler:this.configText,value:a.TEXT.value,suppressEvent:a.TEXT.suppressEvent,supercedes:a.TEXT.supercedes});},init:function(e,d){b.superclass.init.call(this,e);this.beforeInitEvent.fire(b);c.addClass(this.element,b.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(d){this.cfg.applyConfig(d,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(b);},registerForm:function(){b.superclass.registerForm.call(this);var e=this.form.ownerDocument,d=e.createElement("input");d.type="hidden";d.name=this.id;d.value="";this.form.appendChild(d);},configIcon:function(k,j,h){var d=j[0],e=this.body,f=b.ICON_CSS_CLASSNAME,l,i,g;if(d&&d!="none"){l=c.getElementsByClassName(f,"*",e);if(l.length===1){i=l[0];g=i.parentNode;if(g){g.removeChild(i);i=null;}}if(d.indexOf(".")==-1){i=document.createElement("span");i.className=(f+" "+d);i.innerHTML="&#160;";}else{i=document.createElement("img");i.src=(this.imageRoot+d);i.className=f;}if(i){e.insertBefore(i,e.firstChild);}}},configText:function(e,d,f){var g=d[0];if(g){this.setBody(g);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim;}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f;};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.element);h.handleUnderlayStart=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){var j=(k.filters&&k.filters.length>0);if(j){b.addClass(d.element,"yui-effect-fade");}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade");}};h.handleStartAnimateIn=function(k,j,l){l.overlay._fadingIn=true;b.addClass(l.overlay.element,"hide-select");if(!l.overlay.underlay){l.overlay.cfg.refireEvent("underlay");
43 43 }l.handleUnderlayStart();l.overlay._setDomVisibility(true);b.setStyle(l.overlay.element,"opacity",0);};h.handleCompleteAnimateIn=function(k,j,l){l.overlay._fadingIn=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateInCompleteEvent.fire();};h.handleStartAnimateOut=function(k,j,l){l.overlay._fadingOut=true;b.addClass(l.overlay.element,"hide-select");l.handleUnderlayStart();};h.handleCompleteAnimateOut=function(k,j,l){l.overlay._fadingOut=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.overlay._setDomVisibility(false);b.setStyle(l.overlay.element,"opacity",1);l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateOutCompleteEvent.fire();};h.init();return h;};a.SLIDE=function(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px";};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){r.overlay._setDomVisibility(true);}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire();};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q];};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateOut=function(o,n,p){p.overlay._setDomVisibility(false);p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire();};g.init();return g;};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate();},lastFrameOnStop:true,_stopAnims:function(d){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(d);}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(d);}},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]";}return d;}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.9.0",build:"2800"});
44   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
  44 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd,point;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.openlayers.googleLike===true){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));point=new OpenLayers.LonLat(amext.lon,amext.lat);amext=point.transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));return[amext.lon,amext.lat]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(x,y,pixel){var n=x.length,$polygon_area,$i;try{if(n>2){x.push(x[0]);y.push(y[0]);$polygon_area=0;for($i=0;$i<n;$i+=1){$polygon_area+=((x[$i]*y[$i+1])-(y[$i]*x[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{i3GEO.janela.tempoMsg("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
45 45 if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},listaTodasChaves:function(obj){var keys,key="";keys=[];for(key in obj){keys.push(key)}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,criaNo;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=true}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=true;criaNo=function(obj,noDestino){var trad,i,j,linha,conteudo,temaNode,c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){trad=$trad(linha.text);if(!trad){trad=linha.text}conteudo="<a href='#' onclick='"+linha.url+"'>"+trad+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,noDestino,false,true);temaNode.enableHighlight=false;if(obj.propriedades[i].propriedades){criaNo(obj.propriedades[i],temaNode)}}};criaNo(obj,tempNode);arvore.collapseAll();arvore.draw();return arvore},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;novoel.id=id;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<span class=digitar onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' ><input onchange=\""+onch+"\" tabindex='0' onclick='javascript:this.select();' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' /></span>"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci,w,h){if(!w){w=5}if(!h){h=5}if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-(h/2))+"px";i.left=(xi-(w/2))+"px";i.width=w+"px";i.height=h+"px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width=w+"px";temp.height=h+"px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){i3GEO.janela.tempoMsg("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.Panel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},getScrollHeight:function(){var mx=Math.max,d=document;return mx(mx(d.body.scrollHeight,d.documentElement.scrollHeight),mx(d.body.offsetHeight,d.documentElement.offsetHeight),mx(d.body.clientHeight,d.documentElement.clientHeight))},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){if(YAHOO.lang.isFunction(ini)){ini.call()}else{eval(ini)}}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;try{for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[2]&&t[2]=="dicionario_script"){return false}if(t[0]===texto){return true}}return false}catch(e){return false}},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo,estilo,yui){if(onde&&onde!==""){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(!nome){nome=""}if(!multiplo){multiplo=false}if(!estilo||estilo==""){estilo="font-size: 12px;width: 95%;"}if(!yui){yui=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas='',n,nome="";if(yui===true){comboTemas='<input type="button" name='+id+'_button id="'+id+'" value="'+$trad("x33")+'&nbsp;&nbsp;">';id=id+"select";nome=id}if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas+="<select style='"+estilo+"' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas+="<select style='"+estilo+"' id='"+id+"' name='"+nome+"'>"}if(yui===false){comboTemas+="<option value=''>----</option>"}for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="locais"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="editavel"){temp=i3GEO.arvoreDeCamadas.filtraCamadas("editavel","SIM","igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(temp)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.janela.tempoMsg($trad("x13"))}}},checkCombo:function(id,nomes,valores,estilo,funcaoclick,ids,idschecked){var temp,i,combo="",n=valores.length;if(n>0){combo="<div style='"+estilo+"'><table class=lista3 id="+id+" >";for(i=0;i<n;i++){temp="";if(idschecked&&idschecked[i]){temp="checked"}if(!ids){combo+="<tr><td><input "+temp+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}else{combo+="<tr><td><input "+temp+" id="+ids[i]+" onclick="+funcaoclick+" size=2 style='top:1px;cursor:pointer' type=checkbox value='"+valores[i]+"' /></td><td>"+nomes[i]+"</td>"}}combo+="</table></div>"}return combo},valoresCheckCombo:function(id){var el=$i(id),res=[],n,i;if(el){el=el.getElementsByTagName("input");n=el.length;for(i=0;i<n;i++){if(el[i].checked===true){res.push(el[i].value)}}}return res},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left;width:"+size+" cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome,alias){if(!alias){alias="sim"}if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i,nm;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){if(alias=="sim"){nm=retorno.data.valores[i].alias;if(nm===""){nm=retorno.data.valores[i].item}}else{nm=retorno.data.valores[i].item}ins.push("<option value='"+retorno.data.valores[i].item+"' >"+nm+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo,ordenacao){if(!ordenacao||ordenacao==""){ordenacao=="nao"}if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >"+$trad("x65")+"</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){if(ordenacao==="sim"){ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td>Ordem</td>")}else{ins.push("<table class=lista3 ><tr><td></td><td>"+$trad("x64")+"</td><td></td>")}n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left;cursor:text;width:"+size+"' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text value='"+retorno.data.valores[i].item+"' /></td>");if(ordenacao==="sim"){ins.push("<td><input style='text-align:left; cursor:text;' id='ordem_"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='3' value='"+i+"' /></td>")}else{ins.push("<td></td>")}ins.push("</tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >'+$trad("x66")+'</div>',tipo:"erro"}}funcao.call(this,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var c="checked",ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");n=retorno.data.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' "+c+" name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");c="";ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},comboEpsg:function(idCombo,onde,funcaoOnChange,valorDefault){onde=$i(onde);onde.innerHTML="<span style=color:red;font-size:10px; >buscando...</span>";var monta=function(retorno){var ins=[],i,n;if(retorno.data!==undefined){n=retorno.data.length;ins.push("<select id='"+idCombo+"' onChange='"+funcaoOnChange+"(this)' >");for(i=0;i<n;i++){ins.push("<option value='"+retorno.data[i].codigo+"'>"+retorno.data[i].nome+"</option>")}ins.push("</select>");ins=ins.join('');onde.innerHTML=ins;$i(idCombo).value=valorDefault}else{onde.innerHTML='<div class=erro >Ocorreu um erro</div>'}};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container,mantem,onde){var temp=$i(idatual),botoes="",ndiv=document.createElement("div"),nids,i,fundo;if(!mantem){mantem=false}if(temp&&mantem==false){$i(container).removeChild(temp)}fundo="#F2F2F2";$i(container).style.backgroundColor="white";botoes="<table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){botoes+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){botoes+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}botoes+="</tr></table>";var ativaBotoes=function(anterior,proxima,idatual){var i;new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}};if(onde){$i(onde).innerHTML=botoes}else{texto=texto+"<br><br>"+botoes}if(!document.getElementById(idatual)){ndiv.id=idatual;ndiv.innerHTML=texto;$i(container).appendChild(ndiv)}ativaBotoes(anterior,proxima,idatual);temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome,nomejs,nomefuncao){if(!nomejs){nomejs="index.js"}if(!nomefuncao){nomefuncao="i3GEOF."+nome+".criaJanelaFlutuante();"}var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/"+nomejs;if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde("i3GEOF."+nome+"_script"+"aguarde","Carregando JS");i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}else{i3GEO.util.scriptTag(js,nomefuncao,"i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,temp,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento+"&locaplic="+i3GEO.configura.locaplic,nx="",texto="",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";if(i3GEO&&i3GEO.arvoreDeCamadas){ins+="<div id='i3geo_janelaCorRampComboCabeca' class='comboTemasCabecalho' style='top:0px;'> ------</div>"}ins+="&nbsp;&nbsp;&nbsp;"+texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="380px";wdocaiframe.style.width="100%";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.Panel(id,{height:"430px",modal:false,width:"280px",fixedcenter:fix,constraintoviewport:true,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe;if($i("i3geo_janelaCorRampComboCabeca")){temp=function(){var p,tema=$i("i3geo_janelaCorRampComboCabecaSel").value,funcao=function(retorno){parent.frames["i3geo_janelaCorRampi"].document.getElementById("ncores").value=retorno.data.length};if(tema!==""){i3GEO.mapa.ativaTema(tema);p=i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=editalegenda&opcao=edita&tema="+tema;i3GEO.util.ajaxGet(p,funcao);cp=new cpaint()}};i3GEO.janela.comboCabecalhoTemas("i3geo_janelaCorRampComboCabeca","i3geo_janelaCorRampComboCabecaSel","none","ligados",temp)}},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectTierTablet");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},detectaMobile:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm($trad("x73"));if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret},ajaxGet:function(sUrl,funcaoRetorno){sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');re=new RegExp("%3A","g");sUrl=sUrl.replace(re,':');var falhou=function(e){},callback={success:function(o){try{funcaoRetorno.call("",YAHOO.lang.JSON.parse(o.responseText))}catch(e){falhou(e)}},failure:falhou,argument:{foo:"foo",bar:"bar"}};YAHOO.util.Connect.asyncRequest("GET",sUrl,callback)},verifica_html5_storage:function(){if(typeof(Storage)!=="undefined"){return true}else{return false}},pegaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){return window.localStorage[item]}else{return false}},limpaDadosLocal:function(item){if(i3GEO.util.verifica_html5_storage()&&localStorage[item]){window.localStorage.clear(item)}},gravaDadosLocal:function(item,valor){if(i3GEO.util.verifica_html5_storage()){window.localStorage[item]=valor;return true}else{return false}},extGeo2OSM:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1<=180&&temp[0]*1>=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(projWGS84,proj900913);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(projWGS84,proj900913);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},extOSM2Geo:function(ext){if(i3GEO.Interface.openlayers.googleLike===true){var metrica,point,proj900913,projWGS84,temp=ext.split(" ");if(temp[0]*1>=180||temp[0]*1<=-180){projWGS84=new OpenLayers.Projection("EPSG:4326");proj900913=new OpenLayers.Projection("EPSG:900913");point=new OpenLayers.LonLat(temp[0],temp[1]);metrica=point.transform(proj900913,projWGS84);ext=metrica.lon+" "+metrica.lat;point=new OpenLayers.LonLat(temp[2],temp[3]);metrica=point.transform(proj900913,projWGS84);ext+=" "+metrica.lon+" "+metrica.lat}}return ext},navegadorDir:function(obj,listaShp,listaImg,listaFig){if(!obj){listaShp=true;listaImg=true;listaFig=true}var temp=function(){i3GEOF.navegarquivos.iniciaDicionario(obj,listaShp,listaImg,listaFig)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorDir()","navegarquivos","navegarquivos","index.js",temp)},navegadorPostgis:function(obj,conexao,tipo){if(!obj){conexao=""}if(!tipo){tipo="sql"}var temp=function(){i3GEOF.navegapostgis.iniciaDicionario(obj,conexao,tipo)};i3GEO.util.dialogoFerramenta("i3GEO.util.navegadorPostgis()","navegapostgis","navegapostgis","index.js",temp)},base64encode:function(str){var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i<len){c1=str.charCodeAt(i++)&0xff;if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break}c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break}c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F)}return out},base64decode:function(str){var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i<len){do{c1=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c1==-1);if(c1==-1)break;do{c2=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c2==-1);if(c2==-1)break;out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3]}while(i<len&&c3==-1);if(c3==-1)break;out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4]}while(i<len&&c4==-1);if(c4==-1)break;out+=String.fromCharCode(((c3&0x03)<<6)|c4)}return out}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};
46 46 /*
47 47 OpenLayers.js -- OpenLayers Map Viewer Library
... ... @@ -1478,7 +1478,7 @@ b){var c={};c.isDefault=&quot;true&quot;===a.getAttribute(&quot;isDefault&quot;);this.readChildNodes
1478 1478 c);b.matrixIds.push(c)},ScaleDenominator:function(a,b){b.scaleDenominator=parseFloat(this.getChildValue(a))},TopLeftCorner:function(a,b){var c=this.getChildValue(a).split(" "),d;b.supportedCRS&&(d=b.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2"),d=!!this.yx[d]);b.topLeftCorner=d?new OpenLayers.LonLat(c[1],c[0]):new OpenLayers.LonLat(c[0],c[1])},TileWidth:function(a,b){b.tileWidth=parseInt(this.getChildValue(a))},TileHeight:function(a,b){b.tileHeight=parseInt(this.getChildValue(a))},
1479 1479 MatrixWidth:function(a,b){b.matrixWidth=parseInt(this.getChildValue(a))},MatrixHeight:function(a,b){b.matrixHeight=parseInt(this.getChildValue(a))},ResourceURL:function(a,b){b.resourceUrl=b.resourceUrl||{};var c=a.getAttribute("resourceType");b.resourceUrls||(b.resourceUrls=[]);c=b.resourceUrl[c]={format:a.getAttribute("format"),template:a.getAttribute("template"),resourceType:c};b.resourceUrls.push(c)},WSDL:function(a,b){b.wsdl={};b.wsdl.href=a.getAttribute("xlink:href")},ServiceMetadataURL:function(a,
1480 1480 b){b.serviceMetadataUrl={};b.serviceMetadataUrl.href=a.getAttribute("xlink:href")},LegendURL:function(a,b){b.legend={};b.legend.href=a.getAttribute("xlink:href");b.legend.format=a.getAttribute("format")},Dimension:function(a,b){var c={values:[]};this.readChildNodes(a,c);b.dimensions.push(c)},Default:function(a,b){b["default"]=this.getChildValue(a)},Value:function(a,b){b.values.push(this.getChildValue(a))}},ows:OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers.ows},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"});
1481   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false}),renderer=OpenLayers.Util.getParameters(window.location.href).renderer;style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);renderer=(renderer)?[renderer]:OpenLayers.Layer.Vector.prototype.renderers;i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Edi&ccedil;&atilde;o",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,renderers:renderer,vertexRenderIntent:"vertex"});if(i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}},criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
1482   -if(typeof(i3GEO)==='undefined'){var i3GEO={};navn=false;navm=false;$i=function(id){return document.getElementById(id)};app=navigator.appName.substring(0,1);if(app==='N'){navn=true}else{navm=true}OpenLayers.ImgPath="../pacotes/openlayers/img/";OpenLayers.Lang.setCode("pt-BR")}i3GEO.editorOL={simbologia:{opacidade:0.8,texto:"",fillColor:"250,180,15",strokeWidth:2,strokeColor:"250,150,0",pointRadius:4,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},backup:new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}),nomeFuncaoSalvar:"i3GEO.editorOL.salvaGeo()",e_oce:new OpenLayers.Layer.ArcGIS93Rest("ESRI Ocean Basemap","http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_ims:new OpenLayers.Layer.ArcGIS93Rest("ESRI Imagery World 2D","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_wsm:new OpenLayers.Layer.ArcGIS93Rest("ESRI World Street Map","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),ol_mma:new OpenLayers.Layer.WMS("Base cartogr&aacute;fica","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&",{layers:'baseraster',SRS:'EPSG:4618',FORMAT:'image/png'},{singleTile:false}),ol_wms:new OpenLayers.Layer.WMS("OpenLayers WMS","http://labs.metacarta.com/wms/vmap0",{layers:'basic'}),top_wms:new OpenLayers.Layer.WMS("Topon&iacute;mia MMA","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseref.map&",{layers:"base",FORMAT:'image/png'}),est_wms:new OpenLayers.Layer.WMS("Estados do Brasil","http://mapas.mma.gov.br/i3geo/ogc.php?tema=estadosl&",{layers:"estadosl",FORMAT:'image/png'}),fundo:"e_ims,e_wsm,ol_mma,ol_wms,top_wms,est_wms,e_oce",kml:[],layersIniciais:[],botoes:{'pan':true,'zoombox':true,'zoomtot':true,'zoomin':true,'zoomout':true,'legenda':true,'distancia':true,'area':true,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'listag':true,'corta':true,'apaga':true,'procura':true,'selecao':true,'salva':true,'ajuda':true,'propriedades':true,'fecha':false,'tools':true,'undo':false,'frente':false,'legenda':true,'rodadomouse':true},pontos:[],marca:"../pacotes/openlayers/img/marker-gold.png",controles:[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoomBar(),new OpenLayers.Control.LayerSwitcher({'ascending':false}),new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.MousePosition({'separator':' '}),new OpenLayers.Control.OverviewMap(),new OpenLayers.Control.KeyboardDefaults()],tiles:true,incluilayergrafico:true,ativalayerswitcher:false,ativarodadomouse:true,legendahtml:false,numzoom:12,maxext:"",mapext:new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081),mapa:"",inicia:function(){var single=false,alayers=[],fundo=(i3GEO.editorOL.fundo).split(","),nfundo=fundo.length,ncontroles=i3GEO.editorOL.controles.length,i,n;if(i3GEO.editorOL.tiles===false||i3GEO.editorOL.tiles==="false"){single=true}if(i3GEO.editorOL.ativalayerswitcher==="false"){i3GEO.editorOL.ativalayerswitcher=false}if(i3GEO.editorOL.ativalayerswitcher==="true"){i3GEO.editorOL.ativalayerswitcher=true}if(i3GEO.editorOL.ativarodadomouse==="false"){i3GEO.editorOL.ativarodadomouse=false}if(i3GEO.editorOL.ativarodadomouse==="true"){i3GEO.editorOL.ativarodadomouse=true}if(i3GEO.editorOL.legendahtml==="false"){i3GEO.editorOL.legendahtml=false}if(i3GEO.editorOL.legendahtml==="true"){i3GEO.editorOL.legendahtml=true}if(i3GEO.editorOL.incluilayergrafico==="false"){i3GEO.editorOL.incluilayergrafico=false}if(i3GEO.editorOL.incluilayergrafico==="true"){i3GEO.editorOL.incluilayergrafico=true}if(i3GEO.editorOL.incluilayergrafico===true){if(!i3GEO.desenho.layergrafico||i3GEO.desenho.layergrafico!=undefined){i3GEO.editorOL.criaLayerGrafico()}}else{i3GEO.desenho.layergrafico="";i3GEO.editorOL.botoes.linha=false;i3GEO.editorOL.botoes.ponto=false;i3GEO.editorOL.botoes.poligono=false;i3GEO.editorOL.botoes.texto=false;i3GEO.editorOL.botoes.edita=false;i3GEO.editorOL.botoes.listag=false;i3GEO.editorOL.botoes.corta=false;i3GEO.editorOL.botoes.apaga=false;i3GEO.editorOL.botoes.selecao=false;i3GEO.editorOL.botoes.salva=false;i3GEO.editorOL.botoes.propriedades=false;i3GEO.editorOL.botoes.fecha=false;i3GEO.editorOL.botoes.tools=false;i3GEO.editorOL.botoes.undo=false;i3GEO.editorOL.botoes.frente=false}if(i3GEO.editorOL.mapa===""){alert("O objeto i3GEO.editorOL.mapa precisa ser criado com new OpenLayers.Map()");return}for(i=0;i<ncontroles;i++){i3GEO.editorOL.mapa.addControl(i3GEO.editorOL.controles[i])}if(i3GEO.editorOL.fundo!=""){for(i=nfundo-1;i>=0;i--){if(fundo[i]!=""){try{eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';");eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);");eval("i3GEO.editorOL."+fundo[i]+".singleTile = false;");eval("alayers.push(i3GEO.editorOL."+fundo[i]+");")}catch(e){if(alayers[0]){alayers[0].setVisibility(true)}}}}}i3GEO.editorOL.mapa.addLayers(alayers);if(i3GEO.editorOL.layersIniciais!==""){n=i3GEO.editorOL.layersIniciais.length;for(i=0;i<n;i++){i3GEO.editorOL.layersIniciais[i].singleTile=single;i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i])}}if(i3GEO.desenho.layergrafico!==""){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}i3GEO.editorOL.adicionaKml();i3GEO.editorOL.adicionaMarcas();i3GEO.editorOL.coordenadas();i3GEO.editorOL.criaJanelaBusca();i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);if(i3GEO.editorOL.ativalayerswitcher===true){i3GEO.editorOL.ativaLayerSwitcher()}if(i3GEO.editorOL.ativarodadomouse===false){i3GEO.editorOL.desativaRodaDoMouse()}if(i3GEO.editorOL.numzoom!==""){i3GEO.editorOL.mapa.setOptions({numZoomLevels:i3GEO.editorOL.numzoom})}if(i3GEO.editorOL.maxext!==""){i3GEO.editorOL.mapa.setOptions({maxExtent:i3GEO.editorOL.maxext})}if(i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}},criaLayerGrafico:function(){i3GEO.desenho.openlayers.criaLayerGrafico()},layersLigados:function(){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,ins=[],i;for(i=0;i<nlayers;i++){if(layers[i].visibility===true){ins.push(layers[i])}}return ins},layersClonados:function(paramsLayers){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].params&&layers[i].params.CLONETMS===paramsLayers){return(layers[i])}}return false},layertms2wms:function(tms){var layer,url;url=tms.url.replace("&cache=sim","&DESLIGACACHE=sim");url=url.replace("&Z=${z}&X=${x}&Y=${y}","");layer=new OpenLayers.Layer.WMS(tms.layername+"_clone",url,{layers:tms.name,transparent:true},{gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:true,singleTile:true});return layer},removeClone:function(){var nome=i3GEO.editorOL.layerAtivo().layername+"_clone",busca=i3GEO.editorOL.mapa.getLayersByName(nome);if(busca.length>0){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.mapa.getLayersByName(camada.name)[0],false)}},coordenadas:function(){var idcoord=i3GEO.editorOL.mapa.getControlsBy("separator"," ");if(idcoord[0]){i3GEO.editorOL.mapa.events.register("mousemove",i3GEO.editorOL.mapa,function(e){var p,lonlat,d;if(navm){p=new OpenLayers.Pixel(e.x,e.y)}else{p=e.xy}lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(p);d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{$i(idcoord[0].id).innerHTML="Long: "+d[0]+"<br>Lat: "+d[1]}catch(e){}})}},criaJanelaBusca:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,ins,combo="<select id=i3GEOOLlistaTemasBusca ><option value=''>----</option>";for(i=0;i<nlayers;i++){combo+="<option value='"+i+"' >"+layers[i].name+"</option>"}combo+="</select>";ins="<div class=paragrafo >Tema:<br>"+combo;ins+="<br>Item:<br><span id=i3GEOOLcomboitens ></span>";ins+="<br>Procurar por:<br><input type=text size=20 id=i3GEOOLpalavraBusca >";ins+="<br><br><input type=button value='Procurar' id='i3GEOOLbotaoBusca' ></div>";ins+="<br>Resultado:<br><span id=i3GEOOLcomboresultado ></span>";try{YAHOO.namespace("procura.container");YAHOO.procura.container.panel=new YAHOO.widget.Panel("panelprocura",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.procura.container.panel.setHeader("Encontre no mapa");YAHOO.procura.container.panel.setBody(ins);YAHOO.procura.container.panel.setFooter("");YAHOO.procura.container.panel.render(document.body);YAHOO.procura.container.panel.center();document.getElementById("i3GEOOLbotaoBusca").onclick=function(){var layer=i3GEO.editorOL.layerAtivo(),item=document.getElementById("i3GEOOLbuscaItem").value,palavra=document.getElementById("i3GEOOLpalavraBusca").value;if(item===""||palavra===""){alert("Escolha o item e o texto de busca");return}i3GEO.editorOL.busca(layer,item,palavra,"i3GEOOLcomboresultado")};document.getElementById("i3GEOOLlistaTemasBusca").onchange=function(){i3GEO.editorOL.ativaTema(this.value);document.getElementById("i3GEOOLcomboitens").innerHTML="...";i3GEO.editorOL.listaItens(i3GEO.editorOL.layerAtivo(),"i3GEOOLcomboitens","i3GEOOLbuscaItem")}}catch(e){}},criaComboTemas:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,nometema="",temp,combo="<select id=i3GEOOLlistaTemasAtivos style=width:235px; >";for(i=0;i<nlayers;i++){nometema="";if(i3GEO.arvoreDeCamadas&&i3GEO.arvoreDeCamadas.CAMADAS){temp=i3GEO.arvoreDeCamadas.pegaTema(layers[i].name,"","name");if(temp!=""){nometema=temp.tema+" - "}}combo+="<option value='"+i+"' >"+nometema+layers[i].name+"</option>"}combo+="</select>";return combo},atualizaJanelaAtivaTema:function(){var combo=i3GEO.editorOL.criaComboTemas();YAHOO.temaativo.container.panel.setBody(combo);document.getElementById("i3GEOOLlistaTemasAtivos").onchange=function(){if(botaoIdentifica){botaoIdentifica.layers=[i3GEO.editorOL.layersLigados()[this.value]]}}},criaJanelaAtivaTema:function(){var temp;if(!document.getElementById("paneltemaativo")){YAHOO.namespace("temaativo.container");YAHOO.temaativo.container.panel=new YAHOO.widget.Panel("paneltemaativo",{zIndex:20000,iframe:true,width:"250px",visible:false,draggable:true,close:true});YAHOO.temaativo.container.panel.setBody("");if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.temaativo.container.panel.setHeader("Tema ativo<div id='paneltemaativo_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.temaativo.container.panel.setHeader("Tema ativo")}YAHOO.temaativo.container.panel.setFooter("");YAHOO.temaativo.container.panel.render(document.body);YAHOO.temaativo.container.panel.show();YAHOO.temaativo.container.panel.center();i3GEO.editorOL.atualizaJanelaAtivaTema();YAHOO.util.Event.addListener(YAHOO.temaativo.container.panel.close,"click",function(){i3GEOpanelEditor.deactivate();i3GEOpanelEditor.activate();if(i3GEO.eventos&&i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")>0){i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()")}});if(typeof i3GEO!=undefined&&i3GEO!=""){if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEO.editorOL.atualizaJanelaAtivaTema()")}}temp=$i("paneltemaativo_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("paneltemaativo")}}}else{YAHOO.temaativo.container.panel.show();i3GEO.editorOL.atualizaJanelaAtivaTema()}},ativaTema:function(id){document.getElementById("i3GEOOLlistaTemasAtivos").value=id},layerAtivo:function(){var id=document.getElementById("i3GEOOLlistaTemasAtivos");if(id){id=id.value}else{id=i3GEO.temaAtivo}if(id==""){return[]}else{return i3GEO.editorOL.layersLigados()[id]}},listaItens:function(layer,idonde,idobj){if(!layer){return}if(!layer.params){return}var u=layer.url+"&request=describefeaturetype&service=wfs&version=1.0.0";u+="&typename="+layer.params.LAYERS;document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.WFSDescribeFeatureType({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),prop=gml.featureTypes[0].properties,nprop=prop.length,i,combo="<select id="+idobj+" ><option value=''>----</option>";for(i=0;i<nprop;i++){combo+="<option value="+prop[i].name+" >"+prop[i].name+"</option>"}combo+="</select>";document.getElementById(idonde).innerHTML=combo},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},busca:function(layer,item,palavra,onde){document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";var u=layer.url+"&request=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layer.params.LAYERS;u+="&filter=<Filter><PropertyIsLike wildcard=* singleChar=. escape=! ><PropertyName>"+item+"</PropertyName><Literal>*"+palavra+"*</Literal></PropertyIsLike></Filter>";document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";document.getElementById(onde).innerHTML="...";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),ngml=gml.length,i,ins="<select onchange='i3GEO.editorOL.zoomPara(this.value)'>";ins+="<option value=''>---</option>";for(i=0;i<ngml;i++){eval("var valor = gml[i].data."+item);var bounds=gml[i].geometry.getBounds();bounds=bounds.toBBOX();ins+="<option value='"+bounds+"'>"+valor+"</option>"}ins+="</select>";document.getElementById(onde).innerHTML=ins},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},zoomPara:function(bbox){var b=new OpenLayers.Bounds.fromString(bbox);i3GEO.editorOL.mapa.zoomToExtent(b)},mostraLegenda:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,ins="",i;for(i=0;i<nlayers;i++){try{if(layers[i].isBaseLayer===false){var url=layers[i].getFullRequestString({"request":"getlegendgraphic"});if(i3GEO.editorOL.legendahtml===true){url=url.replace("image%2Fpng","text/html");ins+=layers[i].name+"<br><div id=legendaL_"+i+" ></div><br>";eval("var f = function(retorno){document.getElementById('legendaL_"+i+"').innerHTML = retorno.responseText;};");var config={method:"GET",url:url,callback:f};OpenLayers.Request.issue(config)}else{url=url.replace("LAYERS","LAYER");ins+=layers[i].name+"<br><img src='"+url+"' /><br>"}}}catch(e){}}if(!document.getElementById("panellegendaeditorOL")){YAHOO.namespace("legendaeditorOL.container");YAHOO.legendaeditorOL.container.panel=new YAHOO.widget.Panel("panellegendaeditorOL",{zIndex:20000,iframe:true,width:"auto",visible:false,draggable:true,close:true});YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.setHeader("Legenda");YAHOO.legendaeditorOL.container.panel.setFooter("");YAHOO.legendaeditorOL.container.panel.render(document.body);YAHOO.legendaeditorOL.container.panel.show();YAHOO.legendaeditorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close,"click",function(){})}else{YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.show()}},captura:function(lonlat){var layers=[i3GEO.editorOL.layerAtivo()],xy=lonlat.split(","),u=layers[0].url+"&REQUEST=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS;u=u.replace("&cache=sim","&DESLIGACACHE=sim");u=u.replace("&Z=${z}&X=${x}&Y=${y}","");xy[0]=xy[0]*1;xy[1]=xy[1]*1;var poligono=(xy[0]-0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1);u+="&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>";document.body.style.cursor="wait";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="wait"}OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}var i,n,f,fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText);n=gml.length;for(i=0;i<n;i++){f=gml[i];f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,registros:f["attributes"]}}i3GEO.desenho.layergrafico.addFeatures(gml)},failure:function(){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}alert("Erro")}})},salvaGeometrias:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="";if(n>0){if($i("panelsalvageometrias")){YAHOO.salvaGeometrias.container.panel=YAHOO.i3GEO.janela.manager.find("panelsalvageometrias");YAHOO.salvaGeometrias.container.panel.show();YAHOO.salvaGeometrias.container.panel.bringToTop()}else{try{YAHOO.namespace("salvaGeometrias.container");YAHOO.salvaGeometrias.container.panel=new YAHOO.widget.Panel("panelsalvageometrias",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.salvaGeometrias.container.panel.setHeader("Geometrias");YAHOO.salvaGeometrias.container.panel.setBody("");YAHOO.salvaGeometrias.container.panel.setFooter("");YAHOO.salvaGeometrias.container.panel.render(document.body);YAHOO.salvaGeometrias.container.panel.center();if(YAHOO.i3GEO.janela){YAHOO.i3GEO.janela.manager.register(YAHOO.salvaGeometrias.container.panel)}YAHOO.salvaGeometrias.container.panel.show()}catch(e){}}ins+="<p class=paragrafo >Foram encontrada(s) "+n+" geometria(s) selecionada(s) </p>";ins+="<p class=paragrafo ><a href='#' onclick='i3GEO.editorOL.listaGeometriasSel()' >Listar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='"+i3GEO.editorOL.nomeFuncaoSalvar+"' >Salvar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>";YAHOO.salvaGeometrias.container.panel.setBody(ins)}else{alert("Selecione pelo menos um elemento")}},exportarSHP:function(){i3GEO.editorOL.processageo("converteSHP")},listaGeometriasSel:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="",i,a,w,g;for(i=0;i<n;i++){g=geos[i];ins+="<b>Geometria: "+i+"</b><br>"+i3GEO.editorOL.google2wgs(g.geometry)+"<br><br>";ins+="<b>Atributos: "+i+"</b><br>";a=g.attributes;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}if(g.attributes.registros){ins+="<b>Registros: "+i+"</b><br>";a=g.attributes.registros;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}}}w=window.open();w.document.write(ins);w.document.close()},testeSalvar:function(){alert("Funcao nao disponivel. Defina o nome da funcao em i3GEO.editorOL.nomeFuncaoSalvar ")},salvaGeo:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,funcaoOK=function(){if(geos[0].geometry){var registros="",valorunico="",nometema=$i("editorOLcomboTemaEditavel").value,key="",tema,redesenha,p,g=i3GEO.editorOL.google2wgs(geos[0].geometry);if(nometema==""){return}tema=i3GEO.arvoreDeCamadas.pegaTema(nometema,"","name");if(geos[0].attributes.registros){registros=geos[0].attributes.registros;for(key in registros){if(registros[key]&&key==tema.colunaidunico){valorunico=registros[key]}}}redesenha=function(retorno){i3GEO.janela.fechaAguarde("aguardeSalvaPonto");i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);i3GEO.Interface.atualizaTema("",nometema)};i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardeSalvaPonto","Adicionando...");i3GEO.janela.AGUARDEMODAL=false;if(valorunico==""){p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&tema="+nometema+"&wkt="+g)}else{p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=atualizaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&idunico="+valorunico+"&tema="+nometema+"&wkt="+g)}}},funcaoCombo=function(obj){$i("editorOLondeComboTemaEditavel").innerHTML=obj.dados},texto="Salvar no tema:<br><div id=editorOLondeComboTemaEditavel ></div><br><br>";if(n!=1){i3GEO.janela.tempoMsg("Selecione apenas uma figura")}else{i3GEO.janela.confirma(texto,300,"Salva","Cancela",funcaoOK);i3GEO.util.comboTemas("editorOLcomboTemaEditavel",funcaoCombo,"editorOLondeComboTemaEditavel","",false,"editavel")}},criaBotoes:function(botoes){var sketchSymbolizers={"Point":{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},"Line":{strokeWidth:3,strokeOpacity:1,strokeColor:"#666666",strokeDashstyle:"dash"},"Polygon":{strokeWidth:2,strokeOpacity:1,strokeColor:"#666666",fillColor:"white",fillOpacity:0.3}},style=new OpenLayers.Style(),styleMap=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:3}},{extendDefault:false}),adiciona=false,button,controles=[];style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEOpanelEditor=new OpenLayers.Control.Panel({displayClass:"olControlEditingToolbar1 noprint",saveState:false,activateControl:function(c){this.deactivate();this.activate();try{i3GEO.editorOL.ModifyFeature.deactivate();if(i3GEO&&i3GEO.barraDeBotoes){i3GEO.barraDeBotoes.ativaPadrao()}}catch(e){}if(!c.trigger){c.activate()}else{c.trigger.call()}}});if(botoes.procura===true){button=new OpenLayers.Control.Button({displayClass:"editorOLprocura",trigger:function(){YAHOO.procura.container.panel.show()},title:"procura",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.pan===true){controles.push(new OpenLayers.Control.Navigation({title:"deslocar",displayClass:"editorOLpan",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoombox===true){controles.push(new OpenLayers.Control.ZoomBox({title:"zoombox",displayClass:"editorOLzoombox",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoomtot===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomtot",trigger:function(){if(i3GEO.editorOL.mapext&&i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}},title:"ajusta extensao",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomin===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomin",trigger:function(){i3GEO.editorOL.mapa.zoomIn()},title:"aproxima",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomout===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomout",trigger:function(){i3GEO.editorOL.mapa.zoomOut()},title:"afasta",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.legenda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlegenda",trigger:function(){i3GEO.editorOL.mostraLegenda()},title:"legenda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.distancia===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLdistancia",title:"distancia",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units,measure=event.measure;alert("Dist&acirc;ncia: "+measure.toFixed(3)+" "+units)}});controles.push(button);adiciona=true}if(botoes.area===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLarea",title:"area",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units;var measure=event.measure;alert("&Aacute;rea: "+measure.toFixed(3)+" "+units+" quadrados")}});controles.push(button);adiciona=true}if(botoes.identifica===true){botaoIdentifica=new OpenLayers.Control.WMSGetFeatureInfo({maxFeatures:1,infoFormat:'text/plain',layers:[i3GEO.editorOL.layerAtivo()],queryVisible:true,title:"identifica",type:OpenLayers.Control.TYPE_TOOL,displayClass:"editorOLidentifica",eventListeners:{getfeatureinfo:function(event){var lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),lonlattexto="<hr>",formata;if(botoes.linha===true||botoes.ponto===true||botoes.poligono===true||botoes.edita===true){lonlattexto+="<pre><span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>edita geometria</span></pre><br>"}formata=function(texto){var temp,temp1,n,i,f=[],textoN=texto.split(":");try{if(textoN.length>1){temp=textoN[2].replace(/\n\r/g,"");temp=temp.replace(/'/g,"");temp=temp.replace(/\n/g,"|");temp=temp.replace(/_/g," ");temp=temp.replace(/=/g,":");temp=temp.split("|");n=temp.length;for(i=0;i<n;i++){temp1=temp[i].replace(/^\s+/,"");temp1=temp1.replace(/\s+$/,"");if(temp1!="")f.push(temp1)}texto=f.join("<br><br>")}}catch(e){}return texto};i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("chicken",i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),null,"<div style=text-align:left >"+lonlattexto+"<pre>"+formata(event.text)+"</pre></div>",null,true));i3GEO.editorOL.removeClone()},beforegetfeatureinfo:function(event){var ativo=[i3GEO.editorOL.layerAtivo()];if(ativo[0].CLASS_NAME=="OpenLayers.Layer.TMS"||ativo[0].CLASS_NAME=="OpenLayers.Layer.OSM"){ativo=[i3GEO.editorOL.layertms2wms(ativo[0])]}ativo[0].projection=new OpenLayers.Projection("EPSG:4326");event.object.layers=ativo;botaoIdentifica.layers=ativo;botaoIdentifica.url=ativo[0].url},activate:function(){i3GEO.editorOL.criaJanelaAtivaTema()}}});controles.push(botaoIdentifica);adiciona=true}if(botoes.linha===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{displayClass:"editorOLlinha",title:"digitalizar linha",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.ponto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLponto",title:"digitalizar ponto",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=[];if(i3GEO.editorOL.simbologia.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=i3GEO.editorOL.simbologia.externalGraphic;style_mark.graphicWidth=i3GEO.editorOL.simbologia.graphicWidth;style_mark.graphicHeight=i3GEO.editorOL.simbologia.graphicHeight;style_mark.fillOpacity=i3GEO.editorOL.simbologia.opacidade;f=new OpenLayers.Feature.Vector(feature,null,style_mark)}else{f=new OpenLayers.Feature.Vector(feature)}f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,externalGraphic:i3GEO.editorOL.simbologia.externalGraphic,graphicHeight:i3GEO.editorOL.simbologia.graphicHeight,graphicWidth:i3GEO.editorOL.simbologia.graphicWidth};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.poligono===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLpoligono",title:"digitalizar poligono",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.texto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLtexto",title:"incluir texto",type:OpenLayers.Control.TYPE_TOOL,persist:true,callbacks:{done:function(feature){var texto=window.prompt("Texto",""),label=new OpenLayers.Feature.Vector(feature);label["attributes"]={opacidade:0.1,fillColor:"white",strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,texto:texto,pointRadius:2,graphicName:"square",strokeColor:"black",fontColor:i3GEO.editorOL.simbologia.fontColor,fontSize:i3GEO.editorOL.simbologia.fontSize,fontFamily:"Arial",fontWeight:"bold",labelAlign:"rt"};if(texto&&texto!==""){i3GEO.desenho.layergrafico.addFeatures([label])}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.edita===true&&botoes.corta===true&&i3GEO.php){i3GEO.editorOL.CortaFeature=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLcorta",title:"corta figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length!=1){alert("Selecione primeiro um elemento para ser cortado");i3GEO.editorOL.CortaFeature.deactivate()}else{i3GEO.editorOL.CortaFeature.activate()}},callbacks:{done:function(feature){var temp,sel=i3GEO.desenho.layergrafico.selectedFeatures[0].geometry,corta=feature;temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.cortador");if(retorno!=""&&retorno.data&&retorno.data!=""){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}};i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando");i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference")}}});controles.push(i3GEO.editorOL.CortaFeature);adiciona=true}if(botoes.edita===true){i3GEO.editorOL.ModifyFeature=new OpenLayers.Control.ModifyFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLedita",title:"modifica figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,mode:OpenLayers.Control.ModifyFeature.RESHAPE,standalone:false,createVertices:true,styleMap:"default",vertexRenderIntent:"vertex"});controles.push(i3GEO.editorOL.ModifyFeature);adiciona=true}if(botoes.edita===true&&botoes.listag===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlistag",trigger:function(){i3GEO.editorOL.listaGeometrias()},title:"lista geometrias",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.frente===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfrente",trigger:function(){i3GEO.editorOL.trazParaFrente();if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},title:"traz para frente",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.tools===true&&i3GEO.php){button=new OpenLayers.Control.Button({displayClass:"editorOLtools",trigger:function(){if(i3GEO.php){i3GEO.editorOL.ferramentas()}else{i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()")}},title:"ferramentas",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.selecao===true){i3GEO.editorOL.selbutton=new OpenLayers.Control.SelectFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLselecao",title:"seleciona elemento",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,multiple:false,hover:false,toggleKey:"ctrlKey",multipleKey:"shiftKey",box:false});controles.push(i3GEO.editorOL.selbutton);adiciona=true}if(botoes.apaga===true){button=new OpenLayers.Control.Button({displayClass:"editorOLapaga",trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length>0){var x=window.confirm("Exclui os elementos selecionados?");if(x){i3GEO.editorOL.guardaBackup();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}else{alert("Selecione pelo menos um elemento")}},title:"apaga selecionados",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.propriedades===true){button=new OpenLayers.Control.Button({displayClass:"editorOLpropriedades",trigger:function(){i3GEO.editorOL.propriedades()},title:"propriedades",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.salva===true){button=new OpenLayers.Control.Button({displayClass:"editorOLsalva",trigger:function(){i3GEO.editorOL.salvaGeometrias()},title:"salva",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.ajuda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLajuda",trigger:function(){try{window.open(i3GEO.configura.locaplic+"/mashups/openlayers_ajuda.php")}catch(e){window.open("openlayers_ajuda.php")}},title:"ajuda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.fecha===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfecha",trigger:function(){var temp=window.confirm("Remove a edicao?");if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}i3GEOpanelEditor.destroy();try{YAHOO.temaativo.container.panel.destroy()}catch(e){}try{YAHOO.procura.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.listaGeometrias.panel.destroy()}catch(e){}try{YAHOO.editorOL.ferramentas.panel.destroy()}catch(e){}try{YAHOO.legendaeditorOL.container.panel.destroy()}catch(e){}try{YAHOO.salvaGeometrias.container.panel.destroy()}catch(e){}if(temp===true){try{if(i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.removeLayer(i3GEO.desenho.layergrafico);delete(i3GEO.desenho.layergrafico)}if(i3GEO.editorOL.backup){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.backup);delete(i3GEO.editorOL.backup)}}catch(e){}}},title:"fecha editor",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}i3GEOOLsnap=new OpenLayers.Control.Snapping({layer:i3GEO.desenho.layergrafico});i3GEOOLsplit=new OpenLayers.Control.Split({layer:i3GEO.desenho.layergrafico,source:i3GEO.desenho.layergrafico,tolerance:0.0001,eventListeners:{beforesplit:function(event){i3GEO.editorOL.guardaBackup()},aftersplit:function(event){i3GEO.editorOL.flashFeatures(event.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}});if(adiciona===true){i3GEOpanelEditor.addControls(controles);i3GEO.editorOL.mapa.addControl(i3GEOpanelEditor)}},mudaSimbolo:function(estilo,id){var valor=$i(id).value,geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,i;i3GEO.editorOL.simbologia[estilo]=valor;for(i=0;i<n;i++){geos[i].attributes[estilo]=valor;geos[i].style[estilo]=valor}},adicionaMarcas:function(){if(i3GEO.editorOL.pontos.length===0){return}var SHADOW_Z_INDEX=10,MARKER_Z_INDEX=11,layer=new OpenLayers.Layer.Vector("pontos",{styleMap:new OpenLayers.StyleMap({externalGraphic:i3GEO.editorOL.marca,backgroundGraphic:"../pacotes/openlayers/img/marker_shadow.png",backgroundXOffset:0,backgroundYOffset:-7,graphicZIndex:MARKER_Z_INDEX,backgroundGraphicZIndex:SHADOW_Z_INDEX,pointRadius:10}),isBaseLayer:false,rendererOptions:{yOrdering:true},displayInLayerSwitcher:true,visibility:true}),index,x=[],y=[],features=[];for(index=0;index<i3GEO.editorOL.pontos.length;index=index+2){x.push(i3GEO.editorOL.pontos[index]);y.push(i3GEO.editorOL.pontos[index+1])}for(index=0;index<x.length;index++){features.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x[index],y[index])))}layer.addFeatures(features);i3GEO.editorOL.mapa.addLayer(layer)},adicionaKml:function(){var temp,n,i,id,url;n=i3GEO.editorOL.kml.length;for(i=0;i<n;i++){id="kml"+i;url=i3GEO.editorOL.kml[i];eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3GEO.editorOL.mapa.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,g,html="";if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3GEO.editorOL.mapa.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(var j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}}},propriedades:function(){if(!document.getElementById("panelpropriedadesEditor")){YAHOO.namespace("editorOL.container");YAHOO.editorOL.container.panel=new YAHOO.widget.Panel("panelpropriedadesEditor",{zIndex:20000,iframe:true,width:"350px",height:"250px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo ><b>Estilos (utilize a cor no formato r,g,b):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td>Cor do contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeColor\',\'i3GEOEditorOLcorContorno\')" type="text" style="cursor:text" id="i3GEOEditorOLcorContorno" size="12" value="'+i3GEO.editorOL.simbologia.strokeColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorContorno\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor do preenchimento</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fillColor\',\'i3GEOEditorOLcorPre\')" type="text" style="cursor:text" id="i3GEOEditorOLcorPre" size="12" value="'+i3GEO.editorOL.simbologia.fillColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorPre\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontColor\',\'i3GEOEditorOLcorFonte\')" type="text" style="cursor:text" id="i3GEOEditorOLcorFonte" size="12" value="'+i3GEO.editorOL.simbologia.fontColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorFonte\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Tamanho da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontSize\',\'i3GEOEditorOLfontsize\')" type="text" style="cursor:text" id="i3GEOEditorOLfontsize" size="3" value="'+i3GEO.editorOL.simbologia.fontSize+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Opacidade (de 0 a 1)</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'opacidade\',\'i3GEOEditorOLopacidade\')" type="text" style="cursor:text" id="i3GEOEditorOLopacidade" size="3" value="'+i3GEO.editorOL.simbologia.opacidade+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura da linha/contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeWidth\',\'i3GEOEditorOLlarguraLinha\')" type="text" style="cursor:text" id="i3GEOEditorOLlarguraLinha" size="2" value="'+i3GEO.editorOL.simbologia.strokeWidth+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Url de uma figura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'externalGraphic\',\'i3GEOEditorOLexternalGraphic\')" type="text" style="cursor:text" id="i3GEOEditorOLexternalGraphic" size="22" value="'+i3GEO.editorOL.simbologia.externalGraphic+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura e altura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicWidth\',\'i3GEOEditorOLgraphicWidth\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicWidth" size="4" value="'+i3GEO.editorOL.simbologia.graphicWidth+'" />&nbsp;<input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicHeight\',\'i3GEOEditorOLgraphicHeight\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicHeight" size="4" value="'+i3GEO.editorOL.simbologia.graphicHeight+'" /></td><td></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Ajusta n� em edi&ccedil;&atilde;o para o(a):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td></td><td>n�</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_node" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_nodeTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_vertex" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_vertexTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Divide intersec&ccedil;&atilde;o ao digitalizar</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.split()" type="checkbox" id="edge_split_toggle" /></td><td>borda</td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Opera&ccedil;&atilde;o ativada pelo bot&atilde;o de modifica&ccedil;&atilde;o da figura</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input checked style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESHAPE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera figura</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESIZE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera tamanho</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.ROTATE;" type="radio" name=i3geoOLtipoEdita /></td><td>rotaciona</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.DRAG;" type="radio" name=i3geoOLtipoEdita /></td><td>desloca</td>'+' </tr>'+'</table>';YAHOO.editorOL.container.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.container.panel.setHeader("Propriedades<div id='panelpropriedadesEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.container.panel.setHeader("Propriedades")}YAHOO.editorOL.container.panel.setFooter("");YAHOO.editorOL.container.panel.render(document.body);YAHOO.editorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close,"click",function(){});temp=$i("panelpropriedadesEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelpropriedadesEditor")}}}YAHOO.editorOL.container.panel.show();temp=$i("panelpropriedadesEditor").getElementsByTagName("div");if(temp&&temp[2]){temp[2].style.overflow="auto"}},listaGeometrias:function(){if(!document.getElementById("panellistagEditor")){YAHOO.namespace("editorOL.listaGeometrias");YAHOO.editorOL.listaGeometrias.panel=new YAHOO.widget.Panel("panellistagEditor",{zIndex:20000,iframe:true,width:"320px",visible:false,draggable:true,close:true});if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias <div id='panellistagEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias")}YAHOO.editorOL.listaGeometrias.panel.setFooter("");YAHOO.editorOL.listaGeometrias.panel.render(document.body);YAHOO.editorOL.listaGeometrias.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.listaGeometrias.panel.close,"click",function(){YAHOO.editorOL.listaGeometrias.panel.destroy()});temp=$i("panellistagEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panellistagEditor")}}}else{YAHOO.editorOL.listaGeometrias.panel.render(document.body)}var g,temp,geos=i3GEO.desenho.layergrafico.features,n=geos.length,ins="<table class=lista4 >";ins+="<tr><td><i>Geometrias</i></td><td><i>Op&ccedil;&otilde;es</i></td><td></td><td></td></tr>";while(n>0){n-=1;g=geos[n].geometry;ins+="<tr><td>"+g.CLASS_NAME+"</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.selFeature("+n+")'>seleciona</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.unselFeature("+n+")'>limpa</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.flashFeaturesI("+n+")'>brilha</td></tr>"}ins+="</table>";if(geos.length===0){ins="Nenhum elemento gr&aacute;fico encontrado. Utilize as op&ccedil;&otilde;es de cria&ccedil;&atilde;o de geometrias."}YAHOO.editorOL.listaGeometrias.panel.show();if(i3GEO.configura){temp=$i("panellistagEditor").getElementsByTagName("div")[2]}else{temp=$i("panellistagEditor").getElementsByTagName("div")[1]}temp.style.overflow="auto";temp.style.height="100px";temp.innerHTML=ins},ferramentas:function(){if(!document.getElementById("panelferramentasEditor")){YAHOO.namespace("editorOL.ferramentas");YAHOO.editorOL.ferramentas.panel=new YAHOO.widget.Panel("panelferramentasEditor",{zIndex:20000,iframe:true,width:"300px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo >Opera&ccedil;&otilde;es sobre as figuras selecionadas:</p>'+'<select onchange="i3GEO.editorOL.processageo(this.value);this.value = \'\'" >'+' <option value="">---</option>'+' <option value=union >Uni&atilde;o</option>';if(i3GEO.php){ins+=' <option value=intersection >Intersec&ccedil;&atilde;o</option>'+' <option value=convexhull >Convex hull</option>'+' <option value=boundary >Bordas</option>'+' <option value=difference >Diferen&ccedil;a</option>'+' <option value=symdifference >Diferen&ccedil;a sim&eacute;trica</option>'}ins+='</select>'+'<br><br><a class=paragrafo href=# onclick="i3GEO.desenho.layergrafico.destroyFeatures()" >Apaga tudo</a>';YAHOO.editorOL.ferramentas.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas <div id='panelferramentasEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas")}YAHOO.editorOL.ferramentas.panel.setFooter("");YAHOO.editorOL.ferramentas.panel.render(document.body);YAHOO.editorOL.ferramentas.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.ferramentas.panel.close,"click",function(){});temp=$i("panelferramentasEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelferramentasEditor")}}}else{YAHOO.editorOL.ferramentas.panel.render(document.body)}YAHOO.editorOL.ferramentas.panel.show()},snap:function(){var target=i3GEOOLsnap.targets[0],tipos=["node","vertex","edge"],ntipos=tipos.length,i,temp,ativa=false;i3GEOOLsnap.deactivate();for(i=0;i<ntipos;i++){temp=$i("target_"+tipos[i]);target[tipos[i]]=temp.checked;if(temp.checked===true){ativa=true}temp=$i("target_"+tipos[i]+"Tolerance");target[tipos[i]+"Tolerance"]=temp.value}if(ativa===true){i3GEOOLsnap.activate()}},split:function(){i3GEOOLsplit.deactivate();var temp=$i("edge_split_toggle");if(temp.checked===true){i3GEOOLsplit.activate()}},processageo:function(operacao){if(operacao===""){return}var geosel=i3GEO.desenho.layergrafico.selectedFeatures,polis,linhas,pontos,temp;if(geosel.length>0){polis=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Polygon");linhas=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.LineString");pontos=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Point");temp=function(retorno){if(i3GEO.janela){i3GEO.janela.fechaAguarde("i3GEO.editorPoli");i3GEO.janela.fechaAguarde("i3GEO.editorLinhas");i3GEO.janela.fechaAguarde("i3GEO.editorPontos")}if(retorno!=""&&retorno.data&&retorno.data!=""&&operacao!="converteSHP"){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}if(operacao==="converteSHP"){i3GEO.atualiza();i3GEO.janela.minimiza("paneltemaativo")}};if(operacao==="union"&&!i3GEO.php){if(polis.length>0){temp=i3GEO.editorOL.uniaojts(polis);i3GEO.editorOL.substituiFeaturesSel(temp)}if(linhas.length>0){temp=i3GEO.editorOL.uniaojts(linhas);i3GEO.editorOL.substituiFeaturesSel(temp)}if(pontos.length>0){temp=i3GEO.editorOL.uniaojts(p);i3GEO.editorOL.substituiFeaturesSel(temp)}}else{if(polis.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos");i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao)}if(linhas.length>0){i3GEO.janela.abreAguarde("i3GEO.editorLinhas","Linhas");i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao)}if(pontos.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPontos","Pontos");i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao)}}return}else{alert("Selecione pelo menos dois elementos")}},uniaojts:function(geoms){var n=geoms.length,rwkt=new jsts.io.WKTReader(),wwkt=new jsts.io.WKTWriter(),fwkt=new OpenLayers.Format.WKT(),g,i,uniao;if(n>1){uniao=(fwkt.read(geoms[0]).geometry).toString();uniao=rwkt.read(uniao);for(i=1;i<=n;i++){g=(fwkt.read(geoms[i]).geometry).toString();uniao=uniao.union(rwkt.read(g))}uniao=wwkt.write(uniao);return[fwkt.read(uniao)]}else{return false}},retornaGeometriasTipo:function(features,tipo){var n=features.length,lista=[],i,temp;for(i=0;i<n;i++){temp=features[i].geometry;if(temp.CLASS_NAME==tipo){lista.push(temp)}}return lista},guardaBackup:function(){return;if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}else{i3GEO.editorOL.backup.removeFeatures(i3GEO.editorOL.backup.features)}i3GEO.editorOL.backup.addFeatures(i3GEO.desenho.layergrafico.features)},unselTodos:function(){var n,i;n=i3GEO.desenho.layergrafico.features.length;for(i=0;i<n;i++){i3GEO.desenho.layergrafico.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[i])}},unselTodosBackup:function(){var n,i;n=i3GEO.editorOL.backup.features.length;for(i=0;i<n;i++){i3GEO.editorOL.backup.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.backup.features[i])}},restauraBackup:function(){if(i3GEO.editorOL.backup.features.length>0){i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features)}if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},substituiFeaturesSel:function(wkt){i3GEO.editorOL.guardaBackup();try{var f,fwkt=new OpenLayers.Format.WKT();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);f=fwkt.read(wkt);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}catch(e){i3GEO.editorOL.restauraBackup()}},adicionaFeatureWkt:function(wkt,atributos){var f,fwkt=new OpenLayers.Format.WKT();if(atributos.externalGraphic&&atributos.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=atributos.externalGraphic;style_mark.graphicWidth=atributos.graphicWidth;style_mark.graphicHeight=atributos.graphicHeight;style_mark.fillOpacity=atributos.opacidade;f=fwkt.read(wkt);f["attributes"]=atributos;f["style"]=style_mark}else{f=fwkt.read(wkt);f["attributes"]=atributos}i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},flashFeaturesI:function(index){i3GEO.editorOL.flashFeatures([i3GEO.desenho.layergrafico.features[index]],0)},flashFeatures:function(features,index){if(!index){index=0}var current=features[index];if(current&&current.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(features[index],"select")}var prev=features[index-1];if(prev&&prev.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(prev,"default")}++index;if(index<=features.length){window.setTimeout(function(){i3GEO.editorOL.flashFeatures(features,index)},75)}},selFeature:function(index){i3GEO.editorOL.selbutton.select(i3GEO.desenho.layergrafico.features[index])},unselFeature:function(index){i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[index])},carregajts:function(funcao){if(i3GEO.configura){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}else{i3GEO.util.scriptTag("../pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}},trazParaFrente:function(){var features=i3GEO.desenho.layergrafico.selectedFeatures;if(features.length>0){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false});i3GEO.editorOL.backup.addFeatures(features);i3GEO.editorOL.unselTodosBackup();i3GEO.desenho.layergrafico.removeFeatures(features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}else{alert("Selecione pelo menos um elemento")}},pegaControle:function(classe){var n=i3GEO.editorOL.controles.length,i;for(i=0;i<n;i++){if(i3GEO.editorOL.controles[i].CLASS_NAME===classe){return i3GEO.editorOL.controles[i]}}return false},ativaLayerSwitcher:function(){var ls=i3GEO.editorOL.pegaControle("OpenLayers.Control.LayerSwitcher");if(ls){ls.maximizeDiv.click()}},desativaRodaDoMouse:function(){var controls=i3GEO.editorOL.mapa.getControlsByClass('OpenLayers.Control.Navigation');for(var i=0;i<controls.length;++i){controls[i].disableZoomWheel()}},google2wgs:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84=new OpenLayers.Projection("EPSG:4326"),proj900913=new OpenLayers.Projection("EPSG:900913");return obj.transform(proj900913,projWGS84)}else{return obj}}};
  1481 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",layergrafico:null,estilos:{"normal":{fillcolor:'255,0,0',linecolor:'0,0,0',linewidth:'2',circcolor:'255,255,255',textcolor:'100,100,100'},"palido":{fillcolor:'100,100,100',linecolor:'100,100,100',linewidth:'1',circcolor:'100,100,100',textcolor:'100,100,100'},"vermelho":{fillcolor:'100,100,100',linecolor:'255,0,0',linewidth:'1',circcolor:'255,50,0',textcolor:'200,200,200'},"verde":{fillcolor:'100,100,100',linecolor:'100,255,100',linewidth:'1',circcolor:'0,255,0',textcolor:'0,0,0'}},estilosOld:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",openlayers:{inicia:function(){if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}},criaLayerGrafico:function(){if(!i3GEO.desenho.layergrafico){var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3",externalGraphic:"${externalGraphic}"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",zIndex:5000}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:4}},{extendDefault:false});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.desenho.layergrafico=new OpenLayers.Layer.Vector("Graf",{styleMap:styleMap1,displayInLayerSwitcher:true,visibility:true,vertexRenderIntent:"vertex"});if(i3GEO.editorOL&&i3GEO.editorOL.mapa){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}else{i3geoOL.addLayers([i3GEO.desenho.layergrafico])}}}},criaContainerRichdraw:function(){i3GEO.analise.pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w,c,pontosdistobj=i3GEO.analise.pontosdistobj;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);c="";if(navn){c='rgba(255,255,255,0'}if(chro){c=""}i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,c)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,1,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w,b){if(!b){b=""}try{i3GEO.desenho.richdraw.renderer.create('circ',b,i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){i3GEO.desenho.estiloPadrao=padrao;padrao=i3GEO.desenho.estilosOld[padrao];if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)}},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
  1482 +if(typeof(i3GEO)==='undefined'){var i3GEO={};navn=false;navm=false;$i=function(id){return document.getElementById(id)};app=navigator.appName.substring(0,1);if(app==='N'){navn=true}else{navm=true}OpenLayers.ImgPath="../pacotes/openlayers/img/";OpenLayers.Lang.setCode("pt-BR")}i3GEO.editorOL={simbologia:{opacidade:0.8,texto:"",fillColor:"250,180,15",strokeWidth:2,strokeColor:"250,150,0",pointRadius:4,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},backup:new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}),nomeFuncaoSalvar:"i3GEO.editorOL.salvaGeo()",e_oce:new OpenLayers.Layer.ArcGIS93Rest("ESRI Ocean Basemap","http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_ims:new OpenLayers.Layer.ArcGIS93Rest("ESRI Imagery World 2D","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),e_wsm:new OpenLayers.Layer.ArcGIS93Rest("ESRI World Street Map","http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",{format:"jpeg"},{isBaseLayer:true,visibility:false}),ol_mma:new OpenLayers.Layer.WMS("Base cartogr&aacute;fica","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&",{layers:'baseraster',SRS:'EPSG:4618',FORMAT:'image/png'},{singleTile:false}),ol_wms:new OpenLayers.Layer.WMS("OpenLayers WMS","http://labs.metacarta.com/wms/vmap0",{layers:'basic'}),top_wms:new OpenLayers.Layer.WMS("Topon&iacute;mia MMA","http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseref.map&",{layers:"base",FORMAT:'image/png'}),est_wms:new OpenLayers.Layer.WMS("Estados do Brasil","http://mapas.mma.gov.br/i3geo/ogc.php?tema=estadosl&",{layers:"estadosl",FORMAT:'image/png'}),fundo:"e_ims,e_wsm,ol_mma,ol_wms,top_wms,est_wms,e_oce",kml:[],layersIniciais:[],botoes:{'pan':true,'zoombox':true,'zoomtot':true,'zoomin':true,'zoomout':true,'legenda':true,'distancia':true,'area':true,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'listag':true,'corta':true,'apaga':true,'procura':true,'selecao':true,'salva':true,'ajuda':true,'propriedades':true,'fecha':false,'tools':true,'undo':false,'frente':false,'legenda':true,'rodadomouse':true},pontos:[],marca:"../pacotes/openlayers/img/marker-gold.png",controles:[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoomBar(),new OpenLayers.Control.LayerSwitcher({'ascending':false}),new OpenLayers.Control.ScaleLine(),new OpenLayers.Control.MousePosition({'separator':' '}),new OpenLayers.Control.OverviewMap(),new OpenLayers.Control.KeyboardDefaults()],tiles:true,incluilayergrafico:true,ativalayerswitcher:false,ativarodadomouse:true,legendahtml:false,numzoom:12,maxext:"",mapext:new OpenLayers.Bounds(-76.5125927,-39.3925675209,-29.5851853,9.49014852081),mapa:"",inicia:function(){var single=false,alayers=[],fundo=(i3GEO.editorOL.fundo).split(","),nfundo=fundo.length,ncontroles=i3GEO.editorOL.controles.length,i,n;if(i3GEO.editorOL.tiles===false||i3GEO.editorOL.tiles==="false"){single=true}if(i3GEO.editorOL.ativalayerswitcher==="false"){i3GEO.editorOL.ativalayerswitcher=false}if(i3GEO.editorOL.ativalayerswitcher==="true"){i3GEO.editorOL.ativalayerswitcher=true}if(i3GEO.editorOL.ativarodadomouse==="false"){i3GEO.editorOL.ativarodadomouse=false}if(i3GEO.editorOL.ativarodadomouse==="true"){i3GEO.editorOL.ativarodadomouse=true}if(i3GEO.editorOL.legendahtml==="false"){i3GEO.editorOL.legendahtml=false}if(i3GEO.editorOL.legendahtml==="true"){i3GEO.editorOL.legendahtml=true}if(i3GEO.editorOL.incluilayergrafico==="false"){i3GEO.editorOL.incluilayergrafico=false}if(i3GEO.editorOL.incluilayergrafico==="true"){i3GEO.editorOL.incluilayergrafico=true}if(i3GEO.editorOL.incluilayergrafico===true){if(!i3GEO.desenho.layergrafico){i3GEO.editorOL.criaLayerGrafico()}}else{i3GEO.desenho.layergrafico="";i3GEO.editorOL.botoes.linha=false;i3GEO.editorOL.botoes.ponto=false;i3GEO.editorOL.botoes.poligono=false;i3GEO.editorOL.botoes.texto=false;i3GEO.editorOL.botoes.edita=false;i3GEO.editorOL.botoes.listag=false;i3GEO.editorOL.botoes.corta=false;i3GEO.editorOL.botoes.apaga=false;i3GEO.editorOL.botoes.selecao=false;i3GEO.editorOL.botoes.salva=false;i3GEO.editorOL.botoes.propriedades=false;i3GEO.editorOL.botoes.fecha=false;i3GEO.editorOL.botoes.tools=false;i3GEO.editorOL.botoes.undo=false;i3GEO.editorOL.botoes.frente=false}if(i3GEO.editorOL.mapa===""){alert("O objeto i3GEO.editorOL.mapa precisa ser criado com new OpenLayers.Map()");return}for(i=0;i<ncontroles;i++){i3GEO.editorOL.mapa.addControl(i3GEO.editorOL.controles[i])}if(i3GEO.editorOL.fundo!=""){for(i=nfundo-1;i>=0;i--){if(fundo[i]!=""){try{eval("i3GEO.editorOL."+fundo[i]+".transitionEffect = 'resize';");eval("i3GEO.editorOL."+fundo[i]+".setVisibility(false);");eval("i3GEO.editorOL."+fundo[i]+".singleTile = false;");eval("alayers.push(i3GEO.editorOL."+fundo[i]+");")}catch(e){if(alayers[0]){alayers[0].setVisibility(true)}}}}}i3GEO.editorOL.mapa.addLayers(alayers);if(i3GEO.editorOL.layersIniciais!==""){n=i3GEO.editorOL.layersIniciais.length;for(i=0;i<n;i++){i3GEO.editorOL.layersIniciais[i].singleTile=single;i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i])}}if(!i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}i3GEO.editorOL.adicionaKml();i3GEO.editorOL.adicionaMarcas();i3GEO.editorOL.coordenadas();i3GEO.editorOL.criaJanelaBusca();i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);if(i3GEO.editorOL.ativalayerswitcher===true){i3GEO.editorOL.ativaLayerSwitcher()}if(i3GEO.editorOL.ativarodadomouse===false){i3GEO.editorOL.desativaRodaDoMouse()}if(i3GEO.editorOL.numzoom!==""){i3GEO.editorOL.mapa.setOptions({numZoomLevels:i3GEO.editorOL.numzoom})}if(i3GEO.editorOL.maxext!==""){i3GEO.editorOL.mapa.setOptions({maxExtent:i3GEO.editorOL.maxext})}if(i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}},criaLayerGrafico:function(){i3GEO.desenho.openlayers.criaLayerGrafico()},layersLigados:function(){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,ins=[],i;for(i=0;i<nlayers;i++){if(layers[i].visibility===true){ins.push(layers[i])}}return ins},layersClonados:function(paramsLayers){var layers=i3GEO.editorOL.mapa.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].params&&layers[i].params.CLONETMS===paramsLayers){return(layers[i])}}return false},layertms2wms:function(tms){var layer,url;url=tms.url.replace("&cache=sim","&DESLIGACACHE=sim");url=url.replace("&Z=${z}&X=${x}&Y=${y}","");layer=new OpenLayers.Layer.WMS(tms.layername+"_clone",url,{layers:tms.name,transparent:true},{gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:true,singleTile:true});return layer},removeClone:function(){var nome=i3GEO.editorOL.layerAtivo().layername+"_clone",busca=i3GEO.editorOL.mapa.getLayersByName(nome);if(busca.length>0){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.mapa.getLayersByName(camada.name)[0],false)}},coordenadas:function(){var idcoord=i3GEO.editorOL.mapa.getControlsBy("separator"," ");if(idcoord[0]){i3GEO.editorOL.mapa.events.register("mousemove",i3GEO.editorOL.mapa,function(e){var p,lonlat,d;if(navm){p=new OpenLayers.Pixel(e.x,e.y)}else{p=e.xy}lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(p);d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{$i(idcoord[0].id).innerHTML="Long: "+d[0]+"<br>Lat: "+d[1]}catch(e){}})}},criaJanelaBusca:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,ins,combo="<select id=i3GEOOLlistaTemasBusca ><option value=''>----</option>";for(i=0;i<nlayers;i++){combo+="<option value='"+i+"' >"+layers[i].name+"</option>"}combo+="</select>";ins="<div class=paragrafo >Tema:<br>"+combo;ins+="<br>Item:<br><span id=i3GEOOLcomboitens ></span>";ins+="<br>Procurar por:<br><input type=text size=20 id=i3GEOOLpalavraBusca >";ins+="<br><br><input type=button value='Procurar' id='i3GEOOLbotaoBusca' ></div>";ins+="<br>Resultado:<br><span id=i3GEOOLcomboresultado ></span>";try{YAHOO.namespace("procura.container");YAHOO.procura.container.panel=new YAHOO.widget.Panel("panelprocura",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.procura.container.panel.setHeader("Encontre no mapa");YAHOO.procura.container.panel.setBody(ins);YAHOO.procura.container.panel.setFooter("");YAHOO.procura.container.panel.render(document.body);YAHOO.procura.container.panel.center();document.getElementById("i3GEOOLbotaoBusca").onclick=function(){var layer=i3GEO.editorOL.layerAtivo(),item=document.getElementById("i3GEOOLbuscaItem").value,palavra=document.getElementById("i3GEOOLpalavraBusca").value;if(item===""||palavra===""){alert("Escolha o item e o texto de busca");return}i3GEO.editorOL.busca(layer,item,palavra,"i3GEOOLcomboresultado")};document.getElementById("i3GEOOLlistaTemasBusca").onchange=function(){i3GEO.editorOL.ativaTema(this.value);document.getElementById("i3GEOOLcomboitens").innerHTML="...";i3GEO.editorOL.listaItens(i3GEO.editorOL.layerAtivo(),"i3GEOOLcomboitens","i3GEOOLbuscaItem")}}catch(e){}},criaComboTemas:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,i,nometema="",temp,combo="<select id=i3GEOOLlistaTemasAtivos style=width:235px; >";for(i=0;i<nlayers;i++){nometema="";if(i3GEO.arvoreDeCamadas&&i3GEO.arvoreDeCamadas.CAMADAS){temp=i3GEO.arvoreDeCamadas.pegaTema(layers[i].name,"","name");if(temp!=""){nometema=temp.tema+" - "}}combo+="<option value='"+i+"' >"+nometema+layers[i].name+"</option>"}combo+="</select>";return combo},atualizaJanelaAtivaTema:function(){var combo=i3GEO.editorOL.criaComboTemas();YAHOO.temaativo.container.panel.setBody(combo);document.getElementById("i3GEOOLlistaTemasAtivos").onchange=function(){if(botaoIdentifica){botaoIdentifica.layers=[i3GEO.editorOL.layersLigados()[this.value]]}}},criaJanelaAtivaTema:function(){var temp;if(!document.getElementById("paneltemaativo")){YAHOO.namespace("temaativo.container");YAHOO.temaativo.container.panel=new YAHOO.widget.Panel("paneltemaativo",{zIndex:20000,iframe:true,width:"250px",visible:false,draggable:true,close:true});YAHOO.temaativo.container.panel.setBody("");if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.temaativo.container.panel.setHeader("Tema ativo<div id='paneltemaativo_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.temaativo.container.panel.setHeader("Tema ativo")}YAHOO.temaativo.container.panel.setFooter("");YAHOO.temaativo.container.panel.render(document.body);YAHOO.temaativo.container.panel.show();YAHOO.temaativo.container.panel.center();i3GEO.editorOL.atualizaJanelaAtivaTema();YAHOO.util.Event.addListener(YAHOO.temaativo.container.panel.close,"click",function(){i3GEOpanelEditor.deactivate();i3GEOpanelEditor.activate();if(i3GEO.eventos&&i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")>0){i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()")}});if(typeof i3GEO!=undefined&&i3GEO!=""){if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()")<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEO.editorOL.atualizaJanelaAtivaTema()")}}temp=$i("paneltemaativo_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("paneltemaativo")}}}else{YAHOO.temaativo.container.panel.show();i3GEO.editorOL.atualizaJanelaAtivaTema()}},ativaTema:function(id){document.getElementById("i3GEOOLlistaTemasAtivos").value=id},layerAtivo:function(){var id=document.getElementById("i3GEOOLlistaTemasAtivos");if(id){id=id.value}else{id=i3GEO.temaAtivo}if(id==""){return[]}else{return i3GEO.editorOL.layersLigados()[id]}},listaItens:function(layer,idonde,idobj){if(!layer){return}if(!layer.params){return}var u=layer.url+"&request=describefeaturetype&service=wfs&version=1.0.0";u+="&typename="+layer.params.LAYERS;document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.WFSDescribeFeatureType({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),prop=gml.featureTypes[0].properties,nprop=prop.length,i,combo="<select id="+idobj+" ><option value=''>----</option>";for(i=0;i<nprop;i++){combo+="<option value="+prop[i].name+" >"+prop[i].name+"</option>"}combo+="</select>";document.getElementById(idonde).innerHTML=combo},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},busca:function(layer,item,palavra,onde){document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";var u=layer.url+"&request=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layer.params.LAYERS;u+="&filter=<Filter><PropertyIsLike wildcard=* singleChar=. escape=! ><PropertyName>"+item+"</PropertyName><Literal>*"+palavra+"*</Literal></PropertyIsLike></Filter>";document.body.style.cursor="wait";document.getElementById("i3geoMapa").style.cursor="wait";document.getElementById(onde).innerHTML="...";OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";var fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText),ngml=gml.length,i,ins="<select onchange='i3GEO.editorOL.zoomPara(this.value)'>";ins+="<option value=''>---</option>";for(i=0;i<ngml;i++){eval("var valor = gml[i].data."+item);var bounds=gml[i].geometry.getBounds();bounds=bounds.toBBOX();ins+="<option value='"+bounds+"'>"+valor+"</option>"}ins+="</select>";document.getElementById(onde).innerHTML=ins},failure:function(){document.body.style.cursor="default";document.getElementById("i3geoMapa").style.cursor="default";alert("Erro")}})},zoomPara:function(bbox){var b=new OpenLayers.Bounds.fromString(bbox);i3GEO.editorOL.mapa.zoomToExtent(b)},mostraLegenda:function(){var layers=i3GEO.editorOL.layersLigados(),nlayers=layers.length,ins="",i;for(i=0;i<nlayers;i++){try{if(layers[i].isBaseLayer===false){var url=layers[i].getFullRequestString({"request":"getlegendgraphic"});if(i3GEO.editorOL.legendahtml===true){url=url.replace("image%2Fpng","text/html");ins+=layers[i].name+"<br><div id=legendaL_"+i+" ></div><br>";eval("var f = function(retorno){document.getElementById('legendaL_"+i+"').innerHTML = retorno.responseText;};");var config={method:"GET",url:url,callback:f};OpenLayers.Request.issue(config)}else{url=url.replace("LAYERS","LAYER");ins+=layers[i].name+"<br><img src='"+url+"' /><br>"}}}catch(e){}}if(!document.getElementById("panellegendaeditorOL")){YAHOO.namespace("legendaeditorOL.container");YAHOO.legendaeditorOL.container.panel=new YAHOO.widget.Panel("panellegendaeditorOL",{zIndex:20000,iframe:true,width:"auto",visible:false,draggable:true,close:true});YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.setHeader("Legenda");YAHOO.legendaeditorOL.container.panel.setFooter("");YAHOO.legendaeditorOL.container.panel.render(document.body);YAHOO.legendaeditorOL.container.panel.show();YAHOO.legendaeditorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close,"click",function(){})}else{YAHOO.legendaeditorOL.container.panel.setBody(ins);YAHOO.legendaeditorOL.container.panel.show()}},captura:function(lonlat){var layers=[i3GEO.editorOL.layerAtivo()],xy=lonlat.split(","),u=layers[0].url+"&REQUEST=getfeature&service=wfs&version=1.0.0";u+="&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS;u=u.replace("&cache=sim","&DESLIGACACHE=sim");u=u.replace("&Z=${z}&X=${x}&Y=${y}","");xy[0]=xy[0]*1;xy[1]=xy[1]*1;var poligono=(xy[0]-0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]+0.1)+" "+(xy[0]+0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1);u+="&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>";document.body.style.cursor="wait";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="wait"}OpenLayers.Request.issue({method:"GET",url:u,callback:function(retorno){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}var i,n,f,fromgml=new OpenLayers.Format.GML({geometryName:"msGeometry"}),gml=fromgml.read(retorno.responseText);n=gml.length;for(i=0;i<n;i++){f=gml[i];f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,registros:f["attributes"]}}i3GEO.desenho.layergrafico.addFeatures(gml)},failure:function(){document.body.style.cursor="default";if(document.getElementById("i3geoMapa")){document.getElementById("i3geoMapa").style.cursor="default"}alert("Erro")}})},salvaGeometrias:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="";if(n>0){if($i("panelsalvageometrias")){YAHOO.salvaGeometrias.container.panel=YAHOO.i3GEO.janela.manager.find("panelsalvageometrias");YAHOO.salvaGeometrias.container.panel.show();YAHOO.salvaGeometrias.container.panel.bringToTop()}else{try{YAHOO.namespace("salvaGeometrias.container");YAHOO.salvaGeometrias.container.panel=new YAHOO.widget.Panel("panelsalvageometrias",{zIndex:2000,iframe:false,width:"250px",visible:false,draggable:true,close:true});YAHOO.salvaGeometrias.container.panel.setHeader("Geometrias");YAHOO.salvaGeometrias.container.panel.setBody("");YAHOO.salvaGeometrias.container.panel.setFooter("");YAHOO.salvaGeometrias.container.panel.render(document.body);YAHOO.salvaGeometrias.container.panel.center();if(YAHOO.i3GEO.janela){YAHOO.i3GEO.janela.manager.register(YAHOO.salvaGeometrias.container.panel)}YAHOO.salvaGeometrias.container.panel.show()}catch(e){}}ins+="<p class=paragrafo >Foram encontrada(s) "+n+" geometria(s) selecionada(s) </p>";ins+="<p class=paragrafo ><a href='#' onclick='i3GEO.editorOL.listaGeometriasSel()' >Listar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='"+i3GEO.editorOL.nomeFuncaoSalvar+"' >Salvar</a>&nbsp;&nbsp;";ins+="<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>";YAHOO.salvaGeometrias.container.panel.setBody(ins)}else{alert("Selecione pelo menos um elemento")}},exportarSHP:function(){i3GEO.editorOL.processageo("converteSHP")},listaGeometriasSel:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,ins="",i,a,w,g;for(i=0;i<n;i++){g=geos[i];ins+="<b>Geometria: "+i+"</b><br>"+i3GEO.editorOL.google2wgs(g.geometry)+"<br><br>";ins+="<b>Atributos: "+i+"</b><br>";a=g.attributes;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}if(g.attributes.registros){ins+="<b>Registros: "+i+"</b><br>";a=g.attributes.registros;for(key in a){if(a[key]){ins+=key+" = "+a[key]+"<br>"}}}}w=window.open();w.document.write(ins);w.document.close()},testeSalvar:function(){alert("Funcao nao disponivel. Defina o nome da funcao em i3GEO.editorOL.nomeFuncaoSalvar ")},salvaGeo:function(){var geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,funcaoOK=function(){if(geos[0].geometry){var registros="",valorunico="",nometema=$i("editorOLcomboTemaEditavel").value,key="",tema,redesenha,p,g=i3GEO.editorOL.google2wgs(geos[0].geometry);if(nometema==""){return}tema=i3GEO.arvoreDeCamadas.pegaTema(nometema,"","name");if(geos[0].attributes.registros){registros=geos[0].attributes.registros;for(key in registros){if(registros[key]&&key==tema.colunaidunico){valorunico=registros[key]}}}redesenha=function(retorno){i3GEO.janela.fechaAguarde("aguardeSalvaPonto");i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);i3GEO.Interface.atualizaTema("",nometema)};i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardeSalvaPonto","Adicionando...");i3GEO.janela.AGUARDEMODAL=false;if(valorunico==""){p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&tema="+nometema+"&wkt="+g)}else{p=i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=atualizaGeometria&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"foo",redesenha,"&idunico="+valorunico+"&tema="+nometema+"&wkt="+g)}}},funcaoCombo=function(obj){$i("editorOLondeComboTemaEditavel").innerHTML=obj.dados},texto="Salvar no tema:<br><div id=editorOLondeComboTemaEditavel ></div><br><br>";if(n!=1){i3GEO.janela.tempoMsg("Selecione apenas uma figura")}else{i3GEO.janela.confirma(texto,300,"Salva","Cancela",funcaoOK);i3GEO.util.comboTemas("editorOLcomboTemaEditavel",funcaoCombo,"editorOLondeComboTemaEditavel","",false,"editavel")}},criaBotoes:function(botoes){var sketchSymbolizers={"Point":{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},"Line":{strokeWidth:3,strokeOpacity:1,strokeColor:"#666666",strokeDashstyle:"dash"},"Polygon":{strokeWidth:2,strokeOpacity:1,strokeColor:"#666666",fillColor:"white",fillOpacity:0.3}},style=new OpenLayers.Style(),styleMap=new OpenLayers.StyleMap({"default":style,"vertex":{strokeOpacity:1,strokeWidth:1,fillColor:"white",fillOpacity:0.45,pointRadius:3}},{extendDefault:false}),adiciona=false,button,controles=[];style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEOpanelEditor=new OpenLayers.Control.Panel({displayClass:"olControlEditingToolbar1 noprint",saveState:false,activateControl:function(c){this.deactivate();this.activate();try{i3GEO.editorOL.ModifyFeature.deactivate();if(i3GEO&&i3GEO.barraDeBotoes){i3GEO.barraDeBotoes.ativaPadrao()}}catch(e){}if(!c.trigger){c.activate()}else{c.trigger.call()}}});if(botoes.procura===true){button=new OpenLayers.Control.Button({displayClass:"editorOLprocura",trigger:function(){YAHOO.procura.container.panel.show()},title:"procura",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.pan===true){controles.push(new OpenLayers.Control.Navigation({title:"deslocar",displayClass:"editorOLpan",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoombox===true){controles.push(new OpenLayers.Control.ZoomBox({title:"zoombox",displayClass:"editorOLzoombox",type:OpenLayers.Control.TYPE_TOOL}));adiciona=true}if(botoes.zoomtot===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomtot",trigger:function(){if(i3GEO.editorOL.mapext&&i3GEO.editorOL.mapext!=""){i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext)}else{i3GEO.editorOL.mapa.zoomToMaxExtent()}},title:"ajusta extensao",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomin===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomin",trigger:function(){i3GEO.editorOL.mapa.zoomIn()},title:"aproxima",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.zoomout===true){button=new OpenLayers.Control.Button({displayClass:"editorOLzoomout",trigger:function(){i3GEO.editorOL.mapa.zoomOut()},title:"afasta",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.legenda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlegenda",trigger:function(){i3GEO.editorOL.mostraLegenda()},title:"legenda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.distancia===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLdistancia",title:"distancia",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units,measure=event.measure;alert("Dist&acirc;ncia: "+measure.toFixed(3)+" "+units)}});controles.push(button);adiciona=true}if(botoes.area===true){button=new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{handlerOptions:{layerOptions:{styleMap:styleMap}},persist:true,displayClass:"editorOLarea",title:"area",type:OpenLayers.Control.TYPE_TOOL});button.events.on({"measure":function(event){var units=event.units;var measure=event.measure;alert("&Aacute;rea: "+measure.toFixed(3)+" "+units+" quadrados")}});controles.push(button);adiciona=true}if(botoes.identifica===true){botaoIdentifica=new OpenLayers.Control.WMSGetFeatureInfo({maxFeatures:1,infoFormat:'text/plain',layers:[i3GEO.editorOL.layerAtivo()],queryVisible:true,title:"identifica",type:OpenLayers.Control.TYPE_TOOL,displayClass:"editorOLidentifica",eventListeners:{getfeatureinfo:function(event){var lonlat=i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),lonlattexto="<hr>",formata;if(botoes.linha===true||botoes.ponto===true||botoes.poligono===true||botoes.edita===true){lonlattexto+="<pre><span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(\""+lonlat.lon+","+lonlat.lat+"\")'>edita geometria</span></pre><br>"}formata=function(texto){var temp,temp1,n,i,f=[],textoN=texto.split(":");try{if(textoN.length>1){temp=textoN[2].replace(/\n\r/g,"");temp=temp.replace(/'/g,"");temp=temp.replace(/\n/g,"|");temp=temp.replace(/_/g," ");temp=temp.replace(/=/g,":");temp=temp.split("|");n=temp.length;for(i=0;i<n;i++){temp1=temp[i].replace(/^\s+/,"");temp1=temp1.replace(/\s+$/,"");if(temp1!="")f.push(temp1)}texto=f.join("<br><br>")}}catch(e){}return texto};i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("chicken",i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy),null,"<div style=text-align:left >"+lonlattexto+"<pre>"+formata(event.text)+"</pre></div>",null,true));i3GEO.editorOL.removeClone()},beforegetfeatureinfo:function(event){var ativo=[i3GEO.editorOL.layerAtivo()];if(ativo[0].CLASS_NAME=="OpenLayers.Layer.TMS"||ativo[0].CLASS_NAME=="OpenLayers.Layer.OSM"){ativo=[i3GEO.editorOL.layertms2wms(ativo[0])]}ativo[0].projection=new OpenLayers.Projection("EPSG:4326");event.object.layers=ativo;botaoIdentifica.layers=ativo;botaoIdentifica.url=ativo[0].url},activate:function(){i3GEO.editorOL.criaJanelaAtivaTema()}}});controles.push(botaoIdentifica);adiciona=true}if(botoes.linha===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Path,{displayClass:"editorOLlinha",title:"digitalizar linha",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.ponto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLponto",title:"digitalizar ponto",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f,style_mark;if(i3GEO.editorOL.simbologia.externalGraphic!=""){style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=i3GEO.editorOL.simbologia.externalGraphic;style_mark.graphicWidth=i3GEO.editorOL.simbologia.graphicWidth;style_mark.graphicHeight=i3GEO.editorOL.simbologia.graphicHeight;style_mark.fillOpacity=i3GEO.editorOL.simbologia.opacidade;f=new OpenLayers.Feature.Vector(feature,null,style_mark)}else{f=new OpenLayers.Feature.Vector(feature)}f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName,externalGraphic:i3GEO.editorOL.simbologia.externalGraphic,graphicHeight:i3GEO.editorOL.simbologia.graphicHeight,graphicWidth:i3GEO.editorOL.simbologia.graphicWidth};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.poligono===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLpoligono",title:"digitalizar poligono",type:OpenLayers.Control.TYPE_TOOL,callbacks:{done:function(feature){var f=new OpenLayers.Feature.Vector(feature);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.texto===true){button=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Point,{displayClass:"editorOLtexto",title:"incluir texto",type:OpenLayers.Control.TYPE_TOOL,persist:true,callbacks:{done:function(feature){var texto=window.prompt("Texto",""),label=new OpenLayers.Feature.Vector(feature);label["attributes"]={opacidade:0.1,fillColor:"white",strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,texto:texto,pointRadius:2,graphicName:"square",strokeColor:"black",fontColor:i3GEO.editorOL.simbologia.fontColor,fontSize:i3GEO.editorOL.simbologia.fontSize,fontFamily:"Arial",fontWeight:"bold",labelAlign:"rt"};if(texto&&texto!==""){i3GEO.desenho.layergrafico.addFeatures([label])}if(i3GEO.Interface){i3GEO.Interface.openlayers.sobeLayersGraficos()}}}});controles.push(button);adiciona=true}if(botoes.edita===true&&botoes.corta===true&&i3GEO.php){i3GEO.editorOL.CortaFeature=new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico,OpenLayers.Handler.Polygon,{displayClass:"editorOLcorta",title:"corta figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length!=1){alert("Selecione primeiro um elemento para ser cortado");i3GEO.editorOL.CortaFeature.deactivate()}else{i3GEO.editorOL.CortaFeature.activate()}},callbacks:{done:function(feature){var temp,sel=i3GEO.desenho.layergrafico.selectedFeatures[0].geometry,corta=feature;temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.cortador");if(retorno!=""&&retorno.data&&retorno.data!=""){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}};i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando");i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference")}}});controles.push(i3GEO.editorOL.CortaFeature);adiciona=true}if(botoes.edita===true){i3GEO.editorOL.ModifyFeature=new OpenLayers.Control.ModifyFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLedita",title:"modifica figura",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,mode:OpenLayers.Control.ModifyFeature.RESHAPE,standalone:false,createVertices:true,styleMap:"default",vertexRenderIntent:"vertex"});controles.push(i3GEO.editorOL.ModifyFeature);adiciona=true}if(botoes.edita===true&&botoes.listag===true){button=new OpenLayers.Control.Button({displayClass:"editorOLlistag",trigger:function(){i3GEO.editorOL.listaGeometrias()},title:"lista geometrias",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.frente===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfrente",trigger:function(){i3GEO.editorOL.trazParaFrente();if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},title:"traz para frente",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.tools===true&&i3GEO.php){button=new OpenLayers.Control.Button({displayClass:"editorOLtools",trigger:function(){if(i3GEO.php){i3GEO.editorOL.ferramentas()}else{i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()")}},title:"ferramentas",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.selecao===true){i3GEO.editorOL.selbutton=new OpenLayers.Control.SelectFeature(i3GEO.desenho.layergrafico,{displayClass:"editorOLselecao",title:"seleciona elemento",type:OpenLayers.Control.TYPE_TOOL,clickout:true,toggle:true,multiple:false,hover:false,toggleKey:"ctrlKey",multipleKey:"shiftKey",box:false});controles.push(i3GEO.editorOL.selbutton);adiciona=true}if(botoes.apaga===true){button=new OpenLayers.Control.Button({displayClass:"editorOLapaga",trigger:function(){if(i3GEO.desenho.layergrafico.selectedFeatures.length>0){var x=window.confirm("Exclui os elementos selecionados?");if(x){i3GEO.editorOL.guardaBackup();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}else{alert("Selecione pelo menos um elemento")}},title:"apaga selecionados",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.propriedades===true){button=new OpenLayers.Control.Button({displayClass:"editorOLpropriedades",trigger:function(){i3GEO.editorOL.propriedades()},title:"propriedades",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.salva===true){button=new OpenLayers.Control.Button({displayClass:"editorOLsalva",trigger:function(){i3GEO.editorOL.salvaGeometrias()},title:"salva",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.ajuda===true){button=new OpenLayers.Control.Button({displayClass:"editorOLajuda",trigger:function(){try{window.open(i3GEO.configura.locaplic+"/mashups/openlayers_ajuda.php")}catch(e){window.open("openlayers_ajuda.php")}},title:"ajuda",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}if(botoes.fecha===true){button=new OpenLayers.Control.Button({displayClass:"editorOLfecha",trigger:function(){var temp=window.confirm("Remove a edicao?");if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}i3GEOpanelEditor.destroy();try{YAHOO.temaativo.container.panel.destroy()}catch(e){}try{YAHOO.procura.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.container.panel.destroy()}catch(e){}try{YAHOO.editorOL.listaGeometrias.panel.destroy()}catch(e){}try{YAHOO.editorOL.ferramentas.panel.destroy()}catch(e){}try{YAHOO.legendaeditorOL.container.panel.destroy()}catch(e){}try{YAHOO.salvaGeometrias.container.panel.destroy()}catch(e){}if(temp===true){try{if(i3GEO.desenho.layergrafico){i3GEO.editorOL.mapa.removeLayer(i3GEO.desenho.layergrafico);delete(i3GEO.desenho.layergrafico)}if(i3GEO.editorOL.backup){i3GEO.editorOL.mapa.removeLayer(i3GEO.editorOL.backup);delete(i3GEO.editorOL.backup)}}catch(e){}}},title:"fecha editor",type:OpenLayers.Control.TYPE_BUTTON});controles.push(button);adiciona=true}i3GEOOLsnap=new OpenLayers.Control.Snapping({layer:i3GEO.desenho.layergrafico});i3GEOOLsplit=new OpenLayers.Control.Split({layer:i3GEO.desenho.layergrafico,source:i3GEO.desenho.layergrafico,tolerance:0.0001,eventListeners:{beforesplit:function(event){i3GEO.editorOL.guardaBackup()},aftersplit:function(event){i3GEO.editorOL.flashFeatures(event.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}}});if(adiciona===true){i3GEOpanelEditor.addControls(controles);i3GEO.editorOL.mapa.addControl(i3GEOpanelEditor)}},mudaSimbolo:function(estilo,id){var valor=$i(id).value,geos=i3GEO.desenho.layergrafico.selectedFeatures,n=geos.length,i;i3GEO.editorOL.simbologia[estilo]=valor;for(i=0;i<n;i++){geos[i].attributes[estilo]=valor;geos[i].style[estilo]=valor}},adicionaMarcas:function(){if(i3GEO.editorOL.pontos.length===0){return}var SHADOW_Z_INDEX=10,MARKER_Z_INDEX=11,layer=new OpenLayers.Layer.Vector("pontos",{styleMap:new OpenLayers.StyleMap({externalGraphic:i3GEO.editorOL.marca,backgroundGraphic:"../pacotes/openlayers/img/marker_shadow.png",backgroundXOffset:0,backgroundYOffset:-7,graphicZIndex:MARKER_Z_INDEX,backgroundGraphicZIndex:SHADOW_Z_INDEX,pointRadius:10}),isBaseLayer:false,rendererOptions:{yOrdering:true},displayInLayerSwitcher:true,visibility:true}),index,x=[],y=[],features=[];for(index=0;index<i3GEO.editorOL.pontos.length;index=index+2){x.push(i3GEO.editorOL.pontos[index]);y.push(i3GEO.editorOL.pontos[index+1])}for(index=0;index<x.length;index++){features.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x[index],y[index])))}layer.addFeatures(features);i3GEO.editorOL.mapa.addLayer(layer)},adicionaKml:function(){var temp,n,i,id,url;n=i3GEO.editorOL.kml.length;for(i=0;i<n;i++){id="kml"+i;url=i3GEO.editorOL.kml[i];eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3GEO.editorOL.mapa.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,g,html="";if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3GEO.editorOL.mapa.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(var j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}}},propriedades:function(){if(!document.getElementById("panelpropriedadesEditor")){YAHOO.namespace("editorOL.container");YAHOO.editorOL.container.panel=new YAHOO.widget.Panel("panelpropriedadesEditor",{zIndex:20000,iframe:true,width:"350px",height:"250px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo ><b>Estilos (utilize a cor no formato r,g,b):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td>Cor do contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeColor\',\'i3GEOEditorOLcorContorno\')" type="text" style="cursor:text" id="i3GEOEditorOLcorContorno" size="12" value="'+i3GEO.editorOL.simbologia.strokeColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorContorno\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor do preenchimento</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fillColor\',\'i3GEOEditorOLcorPre\')" type="text" style="cursor:text" id="i3GEOEditorOLcorPre" size="12" value="'+i3GEO.editorOL.simbologia.fillColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorPre\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Cor da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontColor\',\'i3GEOEditorOLcorFonte\')" type="text" style="cursor:text" id="i3GEOEditorOLcorFonte" size="12" value="'+i3GEO.editorOL.simbologia.fontColor+'" /></td><td>';if(i3GEO.configura){ins+='<img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEO.util.abreCor(\'\',\'i3GEOEditorOLcorFonte\');" />'}ins+=""+' </td>'+' </tr>'+' <tr>'+' <td>Tamanho da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontSize\',\'i3GEOEditorOLfontsize\')" type="text" style="cursor:text" id="i3GEOEditorOLfontsize" size="3" value="'+i3GEO.editorOL.simbologia.fontSize+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Opacidade (de 0 a 1)</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'opacidade\',\'i3GEOEditorOLopacidade\')" type="text" style="cursor:text" id="i3GEOEditorOLopacidade" size="3" value="'+i3GEO.editorOL.simbologia.opacidade+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura da linha/contorno</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'strokeWidth\',\'i3GEOEditorOLlarguraLinha\')" type="text" style="cursor:text" id="i3GEOEditorOLlarguraLinha" size="2" value="'+i3GEO.editorOL.simbologia.strokeWidth+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Url de uma figura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'externalGraphic\',\'i3GEOEditorOLexternalGraphic\')" type="text" style="cursor:text" id="i3GEOEditorOLexternalGraphic" size="22" value="'+i3GEO.editorOL.simbologia.externalGraphic+'" /></td><td></td>'+' </tr>'+' <tr>'+' <td>Largura e altura</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicWidth\',\'i3GEOEditorOLgraphicWidth\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicWidth" size="4" value="'+i3GEO.editorOL.simbologia.graphicWidth+'" />&nbsp;<input onchange="i3GEO.editorOL.mudaSimbolo(\'graphicHeight\',\'i3GEOEditorOLgraphicHeight\')" type="text" style="cursor:text" id="i3GEOEditorOLgraphicHeight" size="4" value="'+i3GEO.editorOL.simbologia.graphicHeight+'" /></td><td></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Ajusta n&oacute; em edi&ccedil;&atilde;o para o(a):</b></p>'+'<table class=lista7 >'+' <tr>'+' <td></td><td>n&oacute</td><td></td><td>v&eacute;rtice</td><td></td><td>borda</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_node" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_nodeTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_vertex" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_vertexTolerance" type="text" size="3" value=15 /></td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Divide intersec&ccedil;&atilde;o ao digitalizar</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.split()" type="checkbox" id="edge_split_toggle" /></td><td>borda</td>'+' </tr>'+'</table>'+'<br />'+'<p class=paragrafo ><b>Opera&ccedil;&atilde;o ativada pelo bot&atilde;o de modifica&ccedil;&atilde;o da figura</b></p>'+'<table class=lista7 >'+' <tr>'+' <td><input checked style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESHAPE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera figura</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.RESIZE;" type="radio" name=i3geoOLtipoEdita /></td><td>altera tamanho</td>'+' </tr>'+' <tr>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.ROTATE;" type="radio" name=i3geoOLtipoEdita /></td><td>rotaciona</td>'+' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.DRAG;" type="radio" name=i3geoOLtipoEdita /></td><td>desloca</td>'+' </tr>'+'</table>';YAHOO.editorOL.container.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.container.panel.setHeader("Propriedades<div id='panelpropriedadesEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.container.panel.setHeader("Propriedades")}YAHOO.editorOL.container.panel.setFooter("");YAHOO.editorOL.container.panel.render(document.body);YAHOO.editorOL.container.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close,"click",function(){});temp=$i("panelpropriedadesEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelpropriedadesEditor")}}}YAHOO.editorOL.container.panel.show();temp=$i("panelpropriedadesEditor").getElementsByTagName("div");if(temp&&temp[2]){temp[2].style.overflow="auto"}},listaGeometrias:function(){if(!document.getElementById("panellistagEditor")){YAHOO.namespace("editorOL.listaGeometrias");YAHOO.editorOL.listaGeometrias.panel=new YAHOO.widget.Panel("panellistagEditor",{zIndex:20000,iframe:true,width:"320px",visible:false,draggable:true,close:true});if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias <div id='panellistagEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.listaGeometrias.panel.setHeader("Geometrias")}YAHOO.editorOL.listaGeometrias.panel.setFooter("");YAHOO.editorOL.listaGeometrias.panel.render(document.body);YAHOO.editorOL.listaGeometrias.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.listaGeometrias.panel.close,"click",function(){YAHOO.editorOL.listaGeometrias.panel.destroy()});temp=$i("panellistagEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panellistagEditor")}}}else{YAHOO.editorOL.listaGeometrias.panel.render(document.body)}var g,temp,geos=i3GEO.desenho.layergrafico.features,n=geos.length,ins="<table class=lista4 >";ins+="<tr><td><i>Geometrias</i></td><td><i>Op&ccedil;&otilde;es</i></td><td></td><td></td></tr>";while(n>0){n-=1;g=geos[n].geometry;ins+="<tr><td>"+g.CLASS_NAME+"</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.selFeature("+n+")'>seleciona</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.unselFeature("+n+")'>limpa</td><td style='cursor:pointer;color:blue' onclick='javascript:i3GEO.editorOL.flashFeaturesI("+n+")'>brilha</td></tr>"}ins+="</table>";if(geos.length===0){ins="Nenhum elemento gr&aacute;fico encontrado. Utilize as op&ccedil;&otilde;es de cria&ccedil;&atilde;o de geometrias."}YAHOO.editorOL.listaGeometrias.panel.show();if(i3GEO.configura){temp=$i("panellistagEditor").getElementsByTagName("div")[2]}else{temp=$i("panellistagEditor").getElementsByTagName("div")[1]}temp.style.overflow="auto";temp.style.height="100px";temp.innerHTML=ins},ferramentas:function(){if(!document.getElementById("panelferramentasEditor")){YAHOO.namespace("editorOL.ferramentas");YAHOO.editorOL.ferramentas.panel=new YAHOO.widget.Panel("panelferramentasEditor",{zIndex:20000,iframe:true,width:"300px",visible:false,draggable:true,close:true});var ins=""+'<p class=paragrafo >Opera&ccedil;&otilde;es sobre as figuras selecionadas:</p>'+'<select onchange="i3GEO.editorOL.processageo(this.value);this.value = \'\'" >'+' <option value="">---</option>'+' <option value=union >Uni&atilde;o</option>';if(i3GEO.php){ins+=' <option value=intersection >Intersec&ccedil;&atilde;o</option>'+' <option value=convexhull >Convex hull</option>'+' <option value=boundary >Bordas</option>'+' <option value=difference >Diferen&ccedil;a</option>'+' <option value=symdifference >Diferen&ccedil;a sim&eacute;trica</option>'}ins+='</select>'+'<br><br><a class=paragrafo href=# onclick="i3GEO.desenho.layergrafico.destroyFeatures()" >Apaga tudo</a>';YAHOO.editorOL.ferramentas.panel.setBody(ins);if(typeof i3GEO!=undefined&&i3GEO!=""){YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas <div id='panelferramentasEditor_minimizaCabecalho' class='container-minimiza'></div>")}else{YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas")}YAHOO.editorOL.ferramentas.panel.setFooter("");YAHOO.editorOL.ferramentas.panel.render(document.body);YAHOO.editorOL.ferramentas.panel.center();YAHOO.util.Event.addListener(YAHOO.editorOL.ferramentas.panel.close,"click",function(){});temp=$i("panelferramentasEditor_minimizaCabecalho");if(temp){temp.onclick=function(){i3GEO.janela.minimiza("panelferramentasEditor")}}}else{YAHOO.editorOL.ferramentas.panel.render(document.body)}YAHOO.editorOL.ferramentas.panel.show()},snap:function(){var target=i3GEOOLsnap.targets[0],tipos=["node","vertex","edge"],ntipos=tipos.length,i,temp,ativa=false;i3GEOOLsnap.deactivate();for(i=0;i<ntipos;i++){temp=$i("target_"+tipos[i]);target[tipos[i]]=temp.checked;if(temp.checked===true){ativa=true}temp=$i("target_"+tipos[i]+"Tolerance");target[tipos[i]+"Tolerance"]=temp.value}if(ativa===true){i3GEOOLsnap.activate()}},split:function(){i3GEOOLsplit.deactivate();var temp=$i("edge_split_toggle");if(temp.checked===true){i3GEOOLsplit.activate()}},processageo:function(operacao){if(operacao===""){return}var geosel=i3GEO.desenho.layergrafico.selectedFeatures,polis,linhas,pontos,temp;if(geosel.length>0){polis=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Polygon");linhas=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.LineString");pontos=i3GEO.editorOL.retornaGeometriasTipo(geosel,"OpenLayers.Geometry.Point");temp=function(retorno){if(i3GEO.janela){i3GEO.janela.fechaAguarde("i3GEO.editorPoli");i3GEO.janela.fechaAguarde("i3GEO.editorLinhas");i3GEO.janela.fechaAguarde("i3GEO.editorPontos")}if(retorno!=""&&retorno.data&&retorno.data!=""&&operacao!="converteSHP"){i3GEO.editorOL.substituiFeaturesSel(retorno.data)}if(operacao==="converteSHP"){i3GEO.atualiza();i3GEO.janela.minimiza("paneltemaativo")}};if(operacao==="union"&&!i3GEO.php){if(polis.length>0){temp=i3GEO.editorOL.uniaojts(polis);i3GEO.editorOL.substituiFeaturesSel(temp)}if(linhas.length>0){temp=i3GEO.editorOL.uniaojts(linhas);i3GEO.editorOL.substituiFeaturesSel(temp)}if(pontos.length>0){temp=i3GEO.editorOL.uniaojts(p);i3GEO.editorOL.substituiFeaturesSel(temp)}}else{if(polis.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos");i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao)}if(linhas.length>0){i3GEO.janela.abreAguarde("i3GEO.editorLinhas","Linhas");i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao)}if(pontos.length>0){i3GEO.janela.abreAguarde("i3GEO.editorPontos","Pontos");i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao)}}return}else{alert("Selecione pelo menos dois elementos")}},uniaojts:function(geoms){var n=geoms.length,rwkt=new jsts.io.WKTReader(),wwkt=new jsts.io.WKTWriter(),fwkt=new OpenLayers.Format.WKT(),g,i,uniao;if(n>1){uniao=(fwkt.read(geoms[0]).geometry).toString();uniao=rwkt.read(uniao);for(i=1;i<=n;i++){g=(fwkt.read(geoms[i]).geometry).toString();uniao=uniao.union(rwkt.read(g))}uniao=wwkt.write(uniao);return[fwkt.read(uniao)]}else{return false}},retornaGeometriasTipo:function(features,tipo){var n=features.length,lista=[],i,temp;for(i=0;i<n;i++){temp=features[i].geometry;if(temp.CLASS_NAME==tipo){lista.push(temp)}}return lista},guardaBackup:function(){return;if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}else{i3GEO.editorOL.backup.removeFeatures(i3GEO.editorOL.backup.features)}i3GEO.editorOL.backup.addFeatures(i3GEO.desenho.layergrafico.features)},unselTodos:function(){var n,i;n=i3GEO.desenho.layergrafico.features.length;for(i=0;i<n;i++){i3GEO.desenho.layergrafico.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[i])}},unselTodosBackup:function(){var n,i;n=i3GEO.editorOL.backup.features.length;for(i=0;i<n;i++){i3GEO.editorOL.backup.features[i].renderIntent="default";i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.backup.features[i])}},restauraBackup:function(){if(i3GEO.editorOL.backup.features.length>0){i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features)}if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},substituiFeaturesSel:function(wkt){i3GEO.editorOL.guardaBackup();try{var f,fwkt=new OpenLayers.Format.WKT();i3GEO.desenho.layergrafico.removeFeatures(i3GEO.desenho.layergrafico.selectedFeatures);f=fwkt.read(wkt);f["attributes"]={opacidade:i3GEO.editorOL.simbologia.opacidade,texto:i3GEO.editorOL.simbologia.texto,fillColor:i3GEO.editorOL.simbologia.fillColor,strokeWidth:i3GEO.editorOL.simbologia.strokeWidth,strokeColor:i3GEO.editorOL.simbologia.strokeColor,pointRadius:i3GEO.editorOL.simbologia.pointRadius,graphicName:i3GEO.editorOL.simbologia.graphicName};i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}catch(e){i3GEO.editorOL.restauraBackup()}},adicionaFeatureWkt:function(wkt,atributos){var f,fwkt=new OpenLayers.Format.WKT();if(atributos.externalGraphic&&atributos.externalGraphic!=""){var style_mark=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']);style_mark.externalGraphic=atributos.externalGraphic;style_mark.graphicWidth=atributos.graphicWidth;style_mark.graphicHeight=atributos.graphicHeight;style_mark.fillOpacity=atributos.opacidade;f=fwkt.read(wkt);f["attributes"]=atributos;f["style"]=style_mark}else{f=fwkt.read(wkt);f["attributes"]=atributos}i3GEO.desenho.layergrafico.addFeatures([f]);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}},flashFeaturesI:function(index){i3GEO.editorOL.flashFeatures([i3GEO.desenho.layergrafico.features[index]],0)},flashFeatures:function(features,index){if(!index){index=0}var current=features[index];if(current&&current.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(features[index],"select")}var prev=features[index-1];if(prev&&prev.layer===i3GEO.desenho.layergrafico){i3GEO.desenho.layergrafico.drawFeature(prev,"default")}++index;if(index<=features.length){window.setTimeout(function(){i3GEO.editorOL.flashFeatures(features,index)},75)}},selFeature:function(index){i3GEO.editorOL.selbutton.select(i3GEO.desenho.layergrafico.features[index])},unselFeature:function(index){i3GEO.editorOL.selbutton.unselect(i3GEO.desenho.layergrafico.features[index])},carregajts:function(funcao){if(i3GEO.configura){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}else{i3GEO.util.scriptTag("../pacotes/jsts/lib/jsts.js",funcao,"i3GEOjts",true)}},trazParaFrente:function(){var features=i3GEO.desenho.layergrafico.selectedFeatures;if(features.length>0){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false});i3GEO.editorOL.backup.addFeatures(features);i3GEO.editorOL.unselTodosBackup();i3GEO.desenho.layergrafico.removeFeatures(features);i3GEO.desenho.layergrafico.addFeatures(i3GEO.editorOL.backup.features);if(document.getElementById("panellistagEditor")){i3GEO.editorOL.listaGeometrias()}}else{alert("Selecione pelo menos um elemento")}},pegaControle:function(classe){var n=i3GEO.editorOL.controles.length,i;for(i=0;i<n;i++){if(i3GEO.editorOL.controles[i].CLASS_NAME===classe){return i3GEO.editorOL.controles[i]}}return false},ativaLayerSwitcher:function(){var ls=i3GEO.editorOL.pegaControle("OpenLayers.Control.LayerSwitcher");if(ls){ls.maximizeDiv.click()}},desativaRodaDoMouse:function(){var controls=i3GEO.editorOL.mapa.getControlsByClass('OpenLayers.Control.Navigation');for(var i=0;i<controls.length;++i){controls[i].disableZoomWheel()}},google2wgs:function(obj){if(i3GEO.Interface.openlayers.googleLike===true){var projWGS84=new OpenLayers.Projection("EPSG:4326"),proj900913=new OpenLayers.Projection("EPSG:900913");return obj.transform(proj900913,projWGS84)}else{return obj}}};
1483 1483  
1484 1484 <?php if(extension_loaded('zlib')){ob_end_flush();}?>
1485 1485 \ No newline at end of file
... ...