Commit 138576d32c028257a2665333519719f64b268311
1 parent
c1829ae6
Exists in
master
and in
7 other branches
--no commit message
Showing
6 changed files
with
988 additions
and
670 deletions
Show diff stats
classesjs/classe_arvoredecamadas.js
| ... | ... | @@ -72,10 +72,10 @@ i3GEO.arvoreDeCamadas = { |
| 72 | 72 | /** |
| 73 | 73 | * Propriedade: FINALIZA |
| 74 | 74 | * |
| 75 | - * Função ou nome de uma função que será executada após a | |
| 76 | - * árvore ter sido montada A funço permite ajustar a | |
| 77 | - * árvore conforme o programador desejar. É executada apenas | |
| 78 | - * na criação da árvore | |
| 75 | + * Função ou nome de uma função que será | |
| 76 | + * executada após a árvore ter sido montada A funço | |
| 77 | + * permite ajustar a árvore conforme o programador desejar. É | |
| 78 | + * executada apenas na criação da árvore | |
| 79 | 79 | * |
| 80 | 80 | * Tipo {string} - "" |
| 81 | 81 | */ |
| ... | ... | @@ -280,7 +280,8 @@ i3GEO.arvoreDeCamadas = { |
| 280 | 280 | /** |
| 281 | 281 | * Propriedade: OPCOESARVORE |
| 282 | 282 | * |
| 283 | - * Inclui ou não as opções de ícones mostradas na raiz da ávore | |
| 283 | + * Inclui ou não as opções de ícones mostradas | |
| 284 | + * na raiz da ávore | |
| 284 | 285 | * |
| 285 | 286 | * Tipo - {Boolean} - true |
| 286 | 287 | */ |
| ... | ... | @@ -484,30 +485,31 @@ i3GEO.arvoreDeCamadas = { |
| 484 | 485 | var novoel; |
| 485 | 486 | // inclui o div para a barra de progresso |
| 486 | 487 | if (i3GEO.arvoreDeCamadas.BARRAPROGRESSO === true |
| 487 | - && i3GEO.Interface.ATUAL === "openlayers") { | |
| 488 | + && i3GEO.Interface.ATUAL === "openlayers") { | |
| 488 | 489 | if (!$i("i3GEOprogressoDiv")) { |
| 489 | 490 | novoel = document.createElement("div"); |
| 490 | 491 | novoel.id = "i3GEOprogressoDiv"; |
| 491 | 492 | novoel.style.position = "absolute"; |
| 492 | 493 | novoel.style.top = "0px"; |
| 493 | 494 | novoel.style.zIndex = "50000"; |
| 494 | - novoel.style.left = (i3GEO.parametros.w / 2) - 75 + "px"; | |
| 495 | + novoel.style.left = ((i3GEO.parametros.w / 2) - 75) | |
| 496 | + + "px"; | |
| 495 | 497 | // novoel.style.display = "none"; |
| 496 | - $i(i3GEO.Interface.IDMAPA).appendChild(novoel); | |
| 498 | + $i( | |
| 499 | + i3GEO.Interface.IDMAPA).appendChild( | |
| 500 | + novoel); | |
| 497 | 501 | i3GEO.arvoreDeCamadas.progressBar = new YAHOO.widget.ProgressBar( |
| 498 | - { | |
| 499 | - height : 5, | |
| 500 | - width : 150, | |
| 501 | - minValue : 1, | |
| 502 | - maxValue : 0, | |
| 503 | - value : 0 | |
| 504 | - }).render("i3GEOprogressoDiv"); | |
| 502 | + { | |
| 503 | + height : 5, | |
| 504 | + width : 150, | |
| 505 | + minValue : 1, | |
| 506 | + maxValue : 0, | |
| 507 | + value : 0 | |
| 508 | + }).render("i3GEOprogressoDiv"); | |
| 505 | 509 | } |
| 506 | 510 | } |
| 507 | - i3GEO.arvoreDeCamadas.SID = typeof (g_sid) !== 'undefined' ? g_sid | |
| 508 | - : i3GEO.configura.sid; | |
| 509 | - i3GEO.arvoreDeCamadas.LOCAPLIC = typeof (g_locaplic) !== 'undefined' ? g_locaplic | |
| 510 | - : i3GEO.configura.locaplic; | |
| 511 | + i3GEO.arvoreDeCamadas.SID = typeof (g_sid) !== 'undefined' ? g_sid : i3GEO.configura.sid; | |
| 512 | + i3GEO.arvoreDeCamadas.LOCAPLIC = typeof (g_locaplic) !== 'undefined' ? g_locaplic : i3GEO.configura.locaplic; | |
| 511 | 513 | if (onde !== "") { |
| 512 | 514 | i3GEO.arvoreDeCamadas.IDHTML = onde; |
| 513 | 515 | } |
| ... | ... | @@ -517,7 +519,8 @@ i3GEO.arvoreDeCamadas = { |
| 517 | 519 | if (!$i(i3GEO.arvoreDeCamadas.IDHTML)) { |
| 518 | 520 | return; |
| 519 | 521 | } |
| 520 | - if (YAHOO.lang.isUndefined(temas) || temas === "") { | |
| 522 | + if (YAHOO.lang.isUndefined(temas) | |
| 523 | + || temas === "") { | |
| 521 | 524 | temas = i3GEO.arvoreDeCamadas.CAMADAS; |
| 522 | 525 | } |
| 523 | 526 | i3GEO.arvoreDeCamadas.atualiza(temas); |
| ... | ... | @@ -539,16 +542,20 @@ i3GEO.arvoreDeCamadas = { |
| 539 | 542 | /** |
| 540 | 543 | * Function: inicia |
| 541 | 544 | * |
| 542 | - * Essa função cria e inicializa a árvore de camadas utilizando o objeto default que contém os parâmetros de cada camada. | |
| 543 | - * Faz o encadeamento das funções i3GEO.arvoreDeCamadas.cria e atualiza | |
| 545 | + * Essa função cria e inicializa a árvore de camadas | |
| 546 | + * utilizando o objeto default que contém os parâmetros de cada | |
| 547 | + * camada. Faz o encadeamento das funções | |
| 548 | + * i3GEO.arvoreDeCamadas.cria e atualiza | |
| 544 | 549 | * |
| 545 | - * i3GEO.arvoreDeCamadas.FINALIZA também é executado se existir | |
| 550 | + * i3GEO.arvoreDeCamadas.FINALIZA também é executado se | |
| 551 | + * existir | |
| 546 | 552 | * |
| 547 | 553 | * Parametros: |
| 548 | 554 | * |
| 549 | - * id {string} - id do elemento HTML onde a árvore será inserida | |
| 550 | - */ | |
| 551 | - inicia : function(id){ | |
| 555 | + * id {string} - id do elemento HTML onde a árvore será | |
| 556 | + * inserida | |
| 557 | + */ | |
| 558 | + inicia : function(id) { | |
| 552 | 559 | i3GEO.arvoreDeCamadas.cria(id); |
| 553 | 560 | i3GEO.arvoreDeCamadas.atualiza(); |
| 554 | 561 | if (i3GEO.arvoreDeCamadas.FINALIZA !== "") { |
| ... | ... | @@ -600,8 +607,9 @@ i3GEO.arvoreDeCamadas = { |
| 600 | 607 | temp.innerHTML = ""; |
| 601 | 608 | } |
| 602 | 609 | if (temp.innerHTML !== "") { |
| 603 | - if (i3GEO.arvoreDeCamadas.comparaTemas(temas, | |
| 604 | - i3GEO.arvoreDeCamadas.CAMADAS)) { | |
| 610 | + if (i3GEO.arvoreDeCamadas.comparaTemas( | |
| 611 | + temas, | |
| 612 | + i3GEO.arvoreDeCamadas.CAMADAS)) { | |
| 605 | 613 | i3GEO.arvoreDeCamadas.CAMADAS = temas; |
| 606 | 614 | return; |
| 607 | 615 | } |
| ... | ... | @@ -609,7 +617,10 @@ i3GEO.arvoreDeCamadas = { |
| 609 | 617 | } else { |
| 610 | 618 | return; |
| 611 | 619 | } |
| 612 | - i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML, "innerHTML", ""); | |
| 620 | + i3GEO.util.defineValor( | |
| 621 | + i3GEO.arvoreDeCamadas.IDHTML, | |
| 622 | + "innerHTML", | |
| 623 | + ""); | |
| 613 | 624 | i3GEO.arvoreDeCamadas.CAMADAS = temas; |
| 614 | 625 | if (i3GEO.arvoreDeCamadas.CAMADASINICIAIS === "") { |
| 615 | 626 | i3GEO.arvoreDeCamadas.CAMADASINICIAIS = temas; |
| ... | ... | @@ -617,7 +628,9 @@ i3GEO.arvoreDeCamadas = { |
| 617 | 628 | (function() { |
| 618 | 629 | function changeIconMode() { |
| 619 | 630 | var currentIconMode = ""; |
| 620 | - newVal = parseInt(this.value, 10); | |
| 631 | + newVal = parseInt( | |
| 632 | + this.value, | |
| 633 | + 10); | |
| 621 | 634 | if (newVal !== currentIconMode) { |
| 622 | 635 | currentIconMode = newVal; |
| 623 | 636 | } |
| ... | ... | @@ -625,34 +638,37 @@ i3GEO.arvoreDeCamadas = { |
| 625 | 638 | } |
| 626 | 639 | function buildTree() { |
| 627 | 640 | i3GEO.arvoreDeCamadas.ARVORE = new YAHOO.widget.TreeView( |
| 628 | - i3GEO.arvoreDeCamadas.IDHTML); | |
| 641 | + i3GEO.arvoreDeCamadas.IDHTML); | |
| 629 | 642 | // root = i3GEO.arvoreDeCamadas.ARVORE.getRoot(); |
| 630 | 643 | } |
| 631 | 644 | buildTree(); |
| 632 | 645 | })(); |
| 633 | 646 | root = i3GEO.arvoreDeCamadas.ARVORE.getRoot(); |
| 634 | - titulo = "<table><tr><td><b>" + $trad("t1") + "</b></td><td>"; | |
| 647 | + titulo = "<table><tr><td><b>" | |
| 648 | + + $trad("t1") | |
| 649 | + + "</b></td><td>"; | |
| 635 | 650 | // titulo += i3GEO.arvoreDeCamadas.montaOpcoesArvore(); |
| 636 | 651 | titulo += "</td></tr></table>"; |
| 637 | - tempNode = new YAHOO.widget.HTMLNode({ | |
| 638 | - expanded : true, | |
| 639 | - html : titulo, | |
| 640 | - hasIcon : true, | |
| 641 | - enableHighlight : false | |
| 642 | - }, root); | |
| 643 | - if(i3GEO.arvoreDeCamadas.OPCOESARVORE === true){ | |
| 644 | - new YAHOO.widget.HTMLNode({ | |
| 645 | - expanded : false, | |
| 646 | - html : i3GEO.arvoreDeCamadas.montaOpcoesArvore(), | |
| 647 | - hasIcon : false, | |
| 652 | + tempNode = new YAHOO.widget.HTMLNode( | |
| 653 | + { | |
| 654 | + expanded : true, | |
| 655 | + html : titulo, | |
| 656 | + hasIcon : true, | |
| 648 | 657 | enableHighlight : false |
| 649 | - }, tempNode); | |
| 658 | + }, root); | |
| 659 | + if (i3GEO.arvoreDeCamadas.OPCOESARVORE === true) { | |
| 660 | + new YAHOO.widget.HTMLNode( | |
| 661 | + { | |
| 662 | + expanded : false, | |
| 663 | + html : i3GEO.arvoreDeCamadas.montaOpcoesArvore(), | |
| 664 | + hasIcon : false, | |
| 665 | + enableHighlight : false | |
| 666 | + }, tempNode); | |
| 650 | 667 | } |
| 651 | 668 | // |
| 652 | 669 | // estilo usado no input qd existirem grupos |
| 653 | 670 | // |
| 654 | - estilo = navm ? "text-align:left;font-size:11px;vertical-align:middle;display:table-cell;" | |
| 655 | - : "text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;"; | |
| 671 | + estilo = navm ? "text-align:left;font-size:11px;vertical-align:middle;display:table-cell;" : "text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;"; | |
| 656 | 672 | // |
| 657 | 673 | // monta a árvore. |
| 658 | 674 | // se i3GEO.configura.grupoLayers estiver definido |
| ... | ... | @@ -660,39 +676,46 @@ i3GEO.arvoreDeCamadas = { |
| 660 | 676 | // |
| 661 | 677 | if (grupoLayers === "") { |
| 662 | 678 | c = temas.length; |
| 663 | - for (i = 0, j = c; i < j; i += 1) { | |
| 679 | + for ( | |
| 680 | + i = 0, | |
| 681 | + j = c; i < j; i += 1) { | |
| 664 | 682 | ltema = temas[i]; |
| 665 | 683 | try { |
| 666 | 684 | if ((ltema.escondido).toLowerCase() !== "sim") { |
| 667 | 685 | textoTema = i3GEO.arvoreDeCamadas.montaTextoTema(ltema); |
| 668 | 686 | if (textoTema !== "") { |
| 669 | - temaNode = new YAHOO.widget.HTMLNode({ | |
| 670 | - expanded : this.EXPANDIDA, | |
| 671 | - html : textoTema, | |
| 672 | - id : ltema.name, | |
| 673 | - idlegenda : ltema.name, | |
| 674 | - tipo : "tema", | |
| 675 | - enableHighlight : false | |
| 676 | - }, tempNode); | |
| 687 | + temaNode = new YAHOO.widget.HTMLNode( | |
| 688 | + { | |
| 689 | + expanded : this.EXPANDIDA, | |
| 690 | + html : textoTema, | |
| 691 | + id : ltema.name, | |
| 692 | + idlegenda : ltema.name, | |
| 693 | + tipo : "tema", | |
| 694 | + enableHighlight : false | |
| 695 | + }, tempNode); | |
| 677 | 696 | if (this.PERMITEEXPANDIRTEMAS === true) { |
| 678 | 697 | if (this.EXPANDESOLEGENDA === false) { |
| 679 | 698 | temaNode.setDynamicLoad( |
| 680 | - i3GEO.arvoreDeCamadas.montaOpcoes, | |
| 681 | - 1); | |
| 699 | + i3GEO.arvoreDeCamadas.montaOpcoes, | |
| 700 | + 1); | |
| 682 | 701 | } else { |
| 683 | 702 | if (ltema.classe !== "NAO") { |
| 684 | - temaNode | |
| 685 | - .setDynamicLoad( | |
| 686 | - i3GEO.arvoreDeCamadas.mostraLegenda, | |
| 687 | - 1); | |
| 703 | + temaNode.setDynamicLoad( | |
| 704 | + i3GEO.arvoreDeCamadas.mostraLegenda, | |
| 705 | + 1); | |
| 688 | 706 | } |
| 689 | 707 | } |
| 690 | 708 | } |
| 691 | 709 | } |
| 692 | - YAHOO.util.Event.addListener($i("arrastar_" + ltema), | |
| 693 | - "click", YAHOO.util.Event.preventDefault); | |
| 694 | - YAHOO.util.Event.addFocusListener($i("arrastar_" | |
| 695 | - + ltema), YAHOO.util.Event.preventDefault); | |
| 710 | + YAHOO.util.Event.addListener( | |
| 711 | + $i("arrastar_" | |
| 712 | + + ltema), | |
| 713 | + "click", | |
| 714 | + YAHOO.util.Event.preventDefault); | |
| 715 | + YAHOO.util.Event.addFocusListener( | |
| 716 | + $i("arrastar_" | |
| 717 | + + ltema), | |
| 718 | + YAHOO.util.Event.preventDefault); | |
| 696 | 719 | } |
| 697 | 720 | } catch (e) { |
| 698 | 721 | if (typeof (console) !== 'undefined') |
| ... | ... | @@ -705,18 +728,22 @@ i3GEO.arvoreDeCamadas = { |
| 705 | 728 | // grupos |
| 706 | 729 | for (i = 0; i < c; i += 1) { |
| 707 | 730 | noGrupo = ""; |
| 708 | - if (grupoLayers[i].icone && grupoLayers[i].icone === true) { | |
| 731 | + if (grupoLayers[i].icone | |
| 732 | + && grupoLayers[i].icone === true) { | |
| 709 | 733 | noGrupo += "<p style=" |
| 710 | - + estilo | |
| 711 | - + " ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\"" | |
| 712 | - + i3GEO.configura.grupoLayers[i].layers | |
| 713 | - + "\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "; | |
| 734 | + + estilo | |
| 735 | + + " ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\"" | |
| 736 | + + i3GEO.configura.grupoLayers[i].layers | |
| 737 | + + "\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "; | |
| 714 | 738 | } |
| 715 | - noGrupo += "<span style=" + estilo + ";vertical-align:top ><b>" | |
| 716 | - + grupoLayers[i].nome + "</b></span></p>"; | |
| 739 | + noGrupo += "<span style=" | |
| 740 | + + estilo | |
| 741 | + + ";vertical-align:top ><b>" | |
| 742 | + + grupoLayers[i].nome | |
| 743 | + + "</b></span></p>"; | |
| 717 | 744 | d = this.EXPANDIDA; |
| 718 | 745 | if (grupoLayers[i].expandido |
| 719 | - && grupoLayers[i].expandido === true) { | |
| 746 | + && grupoLayers[i].expandido === true) { | |
| 720 | 747 | d = true; |
| 721 | 748 | } |
| 722 | 749 | n = grupoLayers[i].layers.length; |
| ... | ... | @@ -727,17 +754,17 @@ i3GEO.arvoreDeCamadas = { |
| 727 | 754 | for (k = 0; k < nk; k += 1) { |
| 728 | 755 | ltema = temas[k]; |
| 729 | 756 | if (ltema.name === grupoLayers[i].layers[j] |
| 730 | - && ltema.escondido === "nao") { | |
| 757 | + && ltema.escondido === "nao") { | |
| 731 | 758 | if (noGrupo !== "") { |
| 732 | - grupoNode = new YAHOO.widget.HTMLNode({ | |
| 733 | - enableHighlight : false, | |
| 734 | - html : noGrupo, | |
| 735 | - expanded : d | |
| 736 | - }, tempNode); | |
| 759 | + grupoNode = new YAHOO.widget.HTMLNode( | |
| 760 | + { | |
| 761 | + enableHighlight : false, | |
| 762 | + html : noGrupo, | |
| 763 | + expanded : d | |
| 764 | + }, tempNode); | |
| 737 | 765 | noGrupo = ""; |
| 738 | 766 | } |
| 739 | - textoTema = i3GEO.arvoreDeCamadas | |
| 740 | - .montaTextoTema(ltema); | |
| 767 | + textoTema = i3GEO.arvoreDeCamadas.montaTextoTema(ltema); | |
| 741 | 768 | if (textoTema !== "") { |
| 742 | 769 | d = { |
| 743 | 770 | enableHighlight : false, |
| ... | ... | @@ -747,21 +774,25 @@ i3GEO.arvoreDeCamadas = { |
| 747 | 774 | tipo : "tema" |
| 748 | 775 | }; |
| 749 | 776 | if (grupoLayers[i].dinamico |
| 750 | - && grupoLayers[i].dinamico === true) { | |
| 751 | - temaNode = new YAHOO.widget.HTMLNode(d, | |
| 752 | - grupoNode); | |
| 777 | + && grupoLayers[i].dinamico === true) { | |
| 778 | + temaNode = new YAHOO.widget.HTMLNode( | |
| 779 | + d, grupoNode); | |
| 753 | 780 | } else { |
| 754 | - temaNode = new YAHOO.widget.HTMLNode(d, | |
| 755 | - tempNode); | |
| 781 | + temaNode = new YAHOO.widget.HTMLNode( | |
| 782 | + d, tempNode); | |
| 756 | 783 | } |
| 757 | 784 | temaNode.setDynamicLoad( |
| 758 | - i3GEO.arvoreDeCamadas.montaOpcoes, 1); | |
| 759 | - YAHOO.util.Event.addListener($i("arrastar_" | |
| 760 | - + ltema), "click", | |
| 761 | - YAHOO.util.Event.preventDefault); | |
| 785 | + i3GEO.arvoreDeCamadas.montaOpcoes, | |
| 786 | + 1); | |
| 787 | + YAHOO.util.Event.addListener( | |
| 788 | + $i("arrastar_" | |
| 789 | + + ltema), | |
| 790 | + "click", | |
| 791 | + YAHOO.util.Event.preventDefault); | |
| 762 | 792 | YAHOO.util.Event.addFocusListener( |
| 763 | - $i("arrastar_" + ltema), | |
| 764 | - YAHOO.util.Event.preventDefault); | |
| 793 | + $i("arrastar_" | |
| 794 | + + ltema), | |
| 795 | + YAHOO.util.Event.preventDefault); | |
| 765 | 796 | incluidos.push(ltema.name); |
| 766 | 797 | } |
| 767 | 798 | } |
| ... | ... | @@ -769,42 +800,50 @@ i3GEO.arvoreDeCamadas = { |
| 769 | 800 | } |
| 770 | 801 | } |
| 771 | 802 | // inclui os temas não agrupados |
| 772 | - grupoNode = new YAHOO.widget.HTMLNode({ | |
| 773 | - expanded : false, | |
| 774 | - enableHighlight : false, | |
| 775 | - html : "<b>Outros</b>" | |
| 776 | - }, tempNode); | |
| 803 | + grupoNode = new YAHOO.widget.HTMLNode( | |
| 804 | + { | |
| 805 | + expanded : false, | |
| 806 | + enableHighlight : false, | |
| 807 | + html : "<b>Outros</b>" | |
| 808 | + }, tempNode); | |
| 777 | 809 | c = incluidos.length; |
| 778 | 810 | for (k = 0; k < nk; k += 1) { |
| 779 | 811 | ltema = temas[k]; |
| 780 | 812 | n = false; |
| 781 | 813 | for (j = 0; j < c; j += 1) { |
| 782 | 814 | if (incluidos[j] === ltema.name |
| 783 | - || ltema.escondido.toLowerCase() === "sim") { | |
| 815 | + || ltema.escondido.toLowerCase() === "sim") { | |
| 784 | 816 | n = true; |
| 785 | 817 | } |
| 786 | 818 | } |
| 787 | 819 | if (n === false) { |
| 788 | - temaNode = new YAHOO.widget.HTMLNode({ | |
| 789 | - enableHighlight : false, | |
| 790 | - expanded : false, | |
| 791 | - html : i3GEO.arvoreDeCamadas.montaTextoTema(ltema), | |
| 792 | - id : ltema.name, | |
| 793 | - tipo : "tema" | |
| 794 | - }, grupoNode, i3GEO.arvoreDeCamadas.EXPANDIDA, true); | |
| 795 | - temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes, | |
| 796 | - 1); | |
| 797 | - YAHOO.util.Event.addListener($i("arrastar_" + ltema), | |
| 798 | - "click", YAHOO.util.Event.preventDefault); | |
| 799 | - YAHOO.util.Event.addFocusListener($i("arrastar_" + ltema), | |
| 800 | - YAHOO.util.Event.preventDefault); | |
| 820 | + temaNode = new YAHOO.widget.HTMLNode( | |
| 821 | + { | |
| 822 | + enableHighlight : false, | |
| 823 | + expanded : false, | |
| 824 | + html : i3GEO.arvoreDeCamadas.montaTextoTema(ltema), | |
| 825 | + id : ltema.name, | |
| 826 | + tipo : "tema" | |
| 827 | + }, grupoNode, i3GEO.arvoreDeCamadas.EXPANDIDA, true); | |
| 828 | + temaNode.setDynamicLoad( | |
| 829 | + i3GEO.arvoreDeCamadas.montaOpcoes, | |
| 830 | + 1); | |
| 831 | + YAHOO.util.Event.addListener( | |
| 832 | + $i("arrastar_" | |
| 833 | + + ltema), | |
| 834 | + "click", | |
| 835 | + YAHOO.util.Event.preventDefault); | |
| 836 | + YAHOO.util.Event.addFocusListener( | |
| 837 | + $i("arrastar_" | |
| 838 | + + ltema), | |
| 839 | + YAHOO.util.Event.preventDefault); | |
| 801 | 840 | } |
| 802 | 841 | } |
| 803 | 842 | } |
| 804 | 843 | document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign = "left"; |
| 805 | 844 | i3GEO.arvoreDeCamadas.ARVORE.draw(); |
| 806 | 845 | if (i3GEO.arvoreDeCamadas.ARRASTARORDEM === true |
| 807 | - || i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) { | |
| 846 | + || i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) { | |
| 808 | 847 | i3GEO.arvoreDeCamadas.ativaDragDrop(); |
| 809 | 848 | } |
| 810 | 849 | // |
| ... | ... | @@ -814,10 +853,9 @@ i3GEO.arvoreDeCamadas = { |
| 814 | 853 | i3GEO.mapa.ativaTema(i3GEO.temaAtivo); |
| 815 | 854 | i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas(); |
| 816 | 855 | if (i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS === true |
| 817 | - && i3GEO.eventos.NAVEGAMAPA.toString().search( | |
| 818 | - "i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()") < 0) { | |
| 819 | - i3GEO.eventos.NAVEGAMAPA | |
| 820 | - .push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"); | |
| 856 | + && i3GEO.eventos.NAVEGAMAPA.toString().search( | |
| 857 | + "i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()") < 0) { | |
| 858 | + i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"); | |
| 821 | 859 | } |
| 822 | 860 | i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS); |
| 823 | 861 | }, |
| ... | ... | @@ -832,57 +870,67 @@ i3GEO.arvoreDeCamadas = { |
| 832 | 870 | montaOpcoesArvore : function() { |
| 833 | 871 | var ins = "", imb = i3GEO.util.$im("branco.gif"), estilo = function(i) { |
| 834 | 872 | return " onmouseout='javascript:this.className = \"" |
| 835 | - + i | |
| 836 | - + " iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \"" | |
| 837 | - + i + " iconeMini iconeGuiaMovelMouseOver\";' class='" + i | |
| 838 | - + " iconeMini iconeGuiaMovelMouseOut' src='" + imb | |
| 839 | - + "' style='cursor:pointer;text-align:left' "; | |
| 873 | + + i | |
| 874 | + + " iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \"" | |
| 875 | + + i | |
| 876 | + + " iconeMini iconeGuiaMovelMouseOver\";' class='" | |
| 877 | + + i | |
| 878 | + + " iconeMini iconeGuiaMovelMouseOut' src='" | |
| 879 | + + imb | |
| 880 | + + "' style='cursor:pointer;text-align:left' "; | |
| 840 | 881 | }; |
| 841 | 882 | if (this.REFRESH === true) { |
| 842 | 883 | ins += "<img " |
| 843 | - + estilo("i3geo_refresh2") | |
| 844 | - + " onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"; | |
| 884 | + + estilo("i3geo_refresh2") | |
| 885 | + + " onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"; | |
| 845 | 886 | } |
| 846 | 887 | if (this.ARRASTARLIXEIRA === true) { |
| 847 | 888 | ins += "<img " |
| 848 | - + estilo("i3geo_lixeira") | |
| 849 | - + " onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='" | |
| 850 | - + $trad("t2") + "' />"; | |
| 889 | + + estilo("i3geo_lixeira") | |
| 890 | + + " onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='" | |
| 891 | + + $trad("t2") | |
| 892 | + + "' />"; | |
| 851 | 893 | } |
| 852 | 894 | if (this.FILTRAR === true) { |
| 853 | 895 | ins += "<img " |
| 854 | - + estilo("i3geo_filtro") | |
| 855 | - + " onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='" | |
| 856 | - + $trad("t2a") + "' />"; | |
| 896 | + + estilo("i3geo_filtro") | |
| 897 | + + " onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='" | |
| 898 | + + $trad("t2a") | |
| 899 | + + "' />"; | |
| 857 | 900 | } |
| 858 | 901 | if (this.ABRELEGENDA === true) { |
| 859 | 902 | ins += "<img " |
| 860 | - + estilo("soltaleg2") | |
| 861 | - + " onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='" | |
| 862 | - + $trad("t2b") + "' />"; | |
| 903 | + + estilo("soltaleg2") | |
| 904 | + + " onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='" | |
| 905 | + + $trad("t2b") | |
| 906 | + + "' />"; | |
| 863 | 907 | } |
| 864 | 908 | if (this.ALTERAOPACIDADE === true) { |
| 865 | 909 | ins += "<img " |
| 866 | - + estilo("opacidadeMapa") | |
| 867 | - + " onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='" | |
| 868 | - + $trad("t20") + "' />"; | |
| 910 | + + estilo("opacidadeMapa") | |
| 911 | + + " onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='" | |
| 912 | + + $trad("t20") | |
| 913 | + + "' />"; | |
| 869 | 914 | } |
| 870 | 915 | if (this.ANIMAMAPA === true |
| 871 | - && (i3GEO.Interface.ATUAL === "openlayers" || i3GEO.Interface.ATUAL === "googlemaps")) { | |
| 916 | + && (i3GEO.Interface.ATUAL === "openlayers" || i3GEO.Interface.ATUAL === "googlemaps")) { | |
| 872 | 917 | ins += "<img " |
| 873 | - + estilo("animaMapa") | |
| 874 | - + " onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='" | |
| 875 | - + $trad("p21") + "' />"; | |
| 918 | + + estilo("animaMapa") | |
| 919 | + + " onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='" | |
| 920 | + + $trad("p21") | |
| 921 | + + "' />"; | |
| 876 | 922 | } |
| 877 | 923 | if (this.LIGARDESLIGARTODOS === true) { |
| 878 | 924 | ins += " <img " |
| 879 | - + estilo("olhoAberto") | |
| 880 | - + " onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='" | |
| 881 | - + $trad("t3a") + "' />"; | |
| 925 | + + estilo("olhoAberto") | |
| 926 | + + " onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='" | |
| 927 | + + $trad("t3a") | |
| 928 | + + "' />"; | |
| 882 | 929 | ins += " <img " |
| 883 | - + estilo("olhoFechado") | |
| 884 | - + " onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='" | |
| 885 | - + $trad("t3b") + "' />"; | |
| 930 | + + estilo("olhoFechado") | |
| 931 | + + " onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='" | |
| 932 | + + $trad("t3b") | |
| 933 | + + "' />"; | |
| 886 | 934 | } |
| 887 | 935 | return ins; |
| 888 | 936 | }, |
| ... | ... | @@ -929,25 +977,36 @@ i3GEO.arvoreDeCamadas = { |
| 929 | 977 | init : function() { |
| 930 | 978 | var i, ltema; |
| 931 | 979 | if ($i("i3geo_lixeira") |
| 932 | - && i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) { | |
| 933 | - new YAHOO.util.DDTarget("i3geo_lixeira"); | |
| 980 | + && i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) { | |
| 981 | + new YAHOO.util.DDTarget( | |
| 982 | + "i3geo_lixeira"); | |
| 934 | 983 | } |
| 935 | 984 | i = i3GEO.arvoreDeCamadas.CAMADAS.length - 1; |
| 936 | 985 | if (i3GEO.arvoreDeCamadas.CAMADAS.length - 1 >= 0) { |
| 937 | 986 | do { |
| 938 | 987 | ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
| 939 | - if ($i("arrastar_" + ltema.name)) { | |
| 940 | - new YAHOO.example.DDList("arrastar_" + ltema.name); | |
| 988 | + if ($i("arrastar_" | |
| 989 | + + ltema.name)) { | |
| 990 | + new YAHOO.example.DDList( | |
| 991 | + "arrastar_" | |
| 992 | + + ltema.name); | |
| 941 | 993 | } |
| 942 | 994 | } while (i--); |
| 943 | 995 | } |
| 944 | 996 | } |
| 945 | 997 | }; |
| 946 | 998 | YAHOO.example.DDList = function(id, sGroup, config) { |
| 947 | - YAHOO.example.DDList.superclass.constructor.call(this, id, sGroup, | |
| 948 | - config); | |
| 949 | - this.logger = this.logger || YAHOO; | |
| 950 | - YAHOO.util.Dom.setStyle(this.getDragEl(), "opacity", 0.67); // The | |
| 999 | + YAHOO.example.DDList.superclass.constructor.call( | |
| 1000 | + this, | |
| 1001 | + id, | |
| 1002 | + sGroup, | |
| 1003 | + config); | |
| 1004 | + this.logger = this.logger | |
| 1005 | + || YAHOO; | |
| 1006 | + YAHOO.util.Dom.setStyle( | |
| 1007 | + this.getDragEl(), | |
| 1008 | + "opacity", | |
| 1009 | + 0.67); // The | |
| 951 | 1010 | // proxy |
| 952 | 1011 | // is |
| 953 | 1012 | // slightly |
| ... | ... | @@ -955,144 +1014,165 @@ i3GEO.arvoreDeCamadas = { |
| 955 | 1014 | this.goingUp = false; |
| 956 | 1015 | this.lastY = 0; |
| 957 | 1016 | }; |
| 958 | - YAHOO | |
| 959 | - .extend( | |
| 960 | - YAHOO.example.DDList, | |
| 961 | - YAHOO.util.DDProxy, | |
| 962 | - { | |
| 963 | - startDrag : function(x, y) { | |
| 964 | - var dragEl, clickEl, Dom = YAHOO.util.Dom; | |
| 965 | - this.logger.log(this.id + " startDrag"); | |
| 966 | - // make the proxy look like the source element | |
| 967 | - dragEl = this.getDragEl(); | |
| 968 | - clickEl = this.getEl(); | |
| 969 | - Dom.setStyle(clickEl, "visibility", "hidden"); | |
| 970 | - dragEl.innerHTML = clickEl.innerHTML; | |
| 971 | - Dom.setStyle(dragEl, "color", Dom.getStyle( | |
| 972 | - clickEl, "color")); | |
| 973 | - Dom.setStyle(dragEl, "backgroundColor", Dom | |
| 974 | - .getStyle(clickEl, "backgroundColor")); | |
| 975 | - Dom | |
| 976 | - .setStyle(dragEl, "border", | |
| 977 | - "4px solid gray"); | |
| 978 | - Dom.setStyle(dragEl, "z-index", "5000"); | |
| 979 | - }, | |
| 980 | - endDrag : function(e) { | |
| 981 | - var srcEl, proxy, a, thisid, proxyid; | |
| 982 | - srcEl = this.getEl(); | |
| 983 | - proxy = this.getDragEl(); | |
| 984 | - // Show the proxy element and animate it to the | |
| 985 | - // src element's location | |
| 986 | - Dom.setStyle(proxy, "visibility", ""); | |
| 987 | - a = new YAHOO.util.Motion(proxy, { | |
| 988 | - points : { | |
| 989 | - to : Dom.getXY(srcEl) | |
| 990 | - } | |
| 991 | - }, 0.2, YAHOO.util.Easing.easeOut); | |
| 992 | - proxyid = proxy.id; | |
| 993 | - thisid = this.id; | |
| 994 | - // Hide the proxy and show the source element | |
| 995 | - // when finished with the animation | |
| 996 | - a.onComplete.subscribe(function() { | |
| 997 | - var Dom = YAHOO.util.Dom; | |
| 998 | - Dom.setStyle(proxyid, "visibility", | |
| 999 | - "hidden"); | |
| 1000 | - Dom.setStyle(thisid, "visibility", ""); | |
| 1001 | - }); | |
| 1002 | - a.animate(); | |
| 1003 | - YAHOO.util.Dom.setStyle('i3geo_lixeira', | |
| 1004 | - 'border', '0px solid blue'); | |
| 1005 | - }, | |
| 1006 | - onDragDrop : function(e, id) { | |
| 1007 | - var pt, region, tema, destEl, els, lista, temp, DDM = YAHOO.util.DragDropMgr, Dom = YAHOO.util.Dom; | |
| 1008 | - if (DDM.interactionInfo.drop.length === 1) { | |
| 1009 | - pt = DDM.interactionInfo.point; | |
| 1010 | - region = DDM.interactionInfo.sourceRegion; | |
| 1011 | - if (!region.intersect(pt)) { | |
| 1012 | - DDM.refreshCache(); | |
| 1013 | - // exclui tema | |
| 1014 | - if (DDM.getDDById(id).id === "i3geo_lixeira") { | |
| 1015 | - if (i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) { | |
| 1016 | - (new YAHOO.util.Anim( | |
| 1017 | - "i3geo_lixeira", | |
| 1018 | - { | |
| 1019 | - opacity : { | |
| 1020 | - from : 0, | |
| 1021 | - to : 1 | |
| 1022 | - } | |
| 1023 | - }, | |
| 1024 | - 3, | |
| 1025 | - YAHOO.util.Easing.easeOutStrong)) | |
| 1026 | - .animate(); | |
| 1027 | - tema = (this.getEl()).id | |
| 1028 | - .split("arrastar_")[1]; | |
| 1029 | - i3GEO.tema.exclui(tema); | |
| 1030 | - } | |
| 1031 | - } | |
| 1032 | - // muda ordem de desenho do tema | |
| 1033 | - else { | |
| 1034 | - if (i3GEO.arvoreDeCamadas.ARRASTARORDEM === true) { | |
| 1035 | - destEl = Dom.get(id); | |
| 1036 | - destEl | |
| 1037 | - .appendChild(this | |
| 1038 | - .getEl()); | |
| 1039 | - els = i3GEO.arvoreDeCamadas | |
| 1040 | - .listaLigadosDesligados(); | |
| 1041 | - lista = els[2].join(","); | |
| 1042 | - temp = function(retorno) { | |
| 1043 | - i3GEO.atualiza(retorno); | |
| 1044 | - if (i3GEO.Interface.ATUAL === "openlayers") { | |
| 1045 | - i3GEO.Interface.openlayers | |
| 1046 | - .ordenaLayers(); | |
| 1047 | - } | |
| 1048 | - }; | |
| 1049 | - i3GEO.php.reordenatemas(temp, | |
| 1050 | - lista); | |
| 1051 | - } else { | |
| 1052 | - i3GEO.arvoreDeCamadas | |
| 1053 | - .atualiza( | |
| 1054 | - i3GEO.arvoreDeCamadas.CAMADAS, | |
| 1055 | - true); | |
| 1017 | + YAHOO.extend( | |
| 1018 | + YAHOO.example.DDList, | |
| 1019 | + YAHOO.util.DDProxy, | |
| 1020 | + { | |
| 1021 | + startDrag : function(x, y) { | |
| 1022 | + var dragEl, clickEl, Dom = YAHOO.util.Dom; | |
| 1023 | + this.logger.log(this.id | |
| 1024 | + + " startDrag"); | |
| 1025 | + // make the proxy look like the source element | |
| 1026 | + dragEl = this.getDragEl(); | |
| 1027 | + clickEl = this.getEl(); | |
| 1028 | + Dom.setStyle( | |
| 1029 | + clickEl, | |
| 1030 | + "visibility", | |
| 1031 | + "hidden"); | |
| 1032 | + dragEl.innerHTML = clickEl.innerHTML; | |
| 1033 | + Dom.setStyle( | |
| 1034 | + dragEl, | |
| 1035 | + "color", | |
| 1036 | + Dom.getStyle( | |
| 1037 | + clickEl, | |
| 1038 | + "color")); | |
| 1039 | + Dom.setStyle( | |
| 1040 | + dragEl, | |
| 1041 | + "backgroundColor", | |
| 1042 | + Dom.getStyle( | |
| 1043 | + clickEl, | |
| 1044 | + "backgroundColor")); | |
| 1045 | + Dom.setStyle( | |
| 1046 | + dragEl, | |
| 1047 | + "border", | |
| 1048 | + "4px solid gray"); | |
| 1049 | + Dom.setStyle( | |
| 1050 | + dragEl, | |
| 1051 | + "z-index", | |
| 1052 | + "5000"); | |
| 1053 | + }, | |
| 1054 | + endDrag : function(e) { | |
| 1055 | + var srcEl, proxy, a, thisid, proxyid; | |
| 1056 | + srcEl = this.getEl(); | |
| 1057 | + proxy = this.getDragEl(); | |
| 1058 | + // Show the proxy element and animate it to the | |
| 1059 | + // src element's location | |
| 1060 | + Dom.setStyle( | |
| 1061 | + proxy, | |
| 1062 | + "visibility", | |
| 1063 | + ""); | |
| 1064 | + a = new YAHOO.util.Motion( | |
| 1065 | + proxy, { | |
| 1066 | + points : { | |
| 1067 | + to : Dom.getXY(srcEl) | |
| 1068 | + } | |
| 1069 | + }, 0.2, YAHOO.util.Easing.easeOut); | |
| 1070 | + proxyid = proxy.id; | |
| 1071 | + thisid = this.id; | |
| 1072 | + // Hide the proxy and show the source element | |
| 1073 | + // when finished with the animation | |
| 1074 | + a.onComplete.subscribe(function() { | |
| 1075 | + var Dom = YAHOO.util.Dom; | |
| 1076 | + Dom.setStyle( | |
| 1077 | + proxyid, | |
| 1078 | + "visibility", | |
| 1079 | + "hidden"); | |
| 1080 | + Dom.setStyle( | |
| 1081 | + thisid, | |
| 1082 | + "visibility", | |
| 1083 | + ""); | |
| 1084 | + }); | |
| 1085 | + a.animate(); | |
| 1086 | + YAHOO.util.Dom.setStyle( | |
| 1087 | + 'i3geo_lixeira', | |
| 1088 | + 'border', | |
| 1089 | + '0px solid blue'); | |
| 1090 | + }, | |
| 1091 | + onDragDrop : function(e, id) { | |
| 1092 | + var pt, region, tema, destEl, els, lista, temp, DDM = YAHOO.util.DragDropMgr, Dom = YAHOO.util.Dom; | |
| 1093 | + if (DDM.interactionInfo.drop.length === 1) { | |
| 1094 | + pt = DDM.interactionInfo.point; | |
| 1095 | + region = DDM.interactionInfo.sourceRegion; | |
| 1096 | + if (!region.intersect(pt)) { | |
| 1097 | + DDM.refreshCache(); | |
| 1098 | + // exclui tema | |
| 1099 | + if (DDM.getDDById(id).id === "i3geo_lixeira") { | |
| 1100 | + if (i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) { | |
| 1101 | + (new YAHOO.util.Anim( | |
| 1102 | + "i3geo_lixeira", { | |
| 1103 | + opacity : { | |
| 1104 | + from : 0, | |
| 1105 | + to : 1 | |
| 1056 | 1106 | } |
| 1057 | - } | |
| 1058 | - } | |
| 1107 | + }, 3, YAHOO.util.Easing.easeOutStrong)).animate(); | |
| 1108 | + tema = (this.getEl()).id.split("arrastar_")[1]; | |
| 1109 | + i3GEO.tema.exclui(tema); | |
| 1059 | 1110 | } |
| 1060 | - }, | |
| 1061 | - onDrag : function(e) { | |
| 1062 | - // Keep track of the direction of the drag for | |
| 1063 | - // use during onDragOver | |
| 1064 | - var y; | |
| 1065 | - y = Event.getPageY(e); | |
| 1066 | - if (y < this.lastY) { | |
| 1067 | - this.goingUp = true; | |
| 1068 | - } else if (y > this.lastY) { | |
| 1069 | - this.goingUp = false; | |
| 1070 | - } | |
| 1071 | - this.lastY = y; | |
| 1072 | - if (i3GEO.guias.TIPO === "movel") { | |
| 1073 | - YAHOO.util.Dom.setStyle( | |
| 1074 | - "i3GEOguiaMovelMolde", "opacity", | |
| 1075 | - 0.9); | |
| 1076 | - } | |
| 1077 | - }, | |
| 1078 | - onDragOver : function(e, id) { | |
| 1079 | - var destEl; | |
| 1080 | - destEl = YAHOO.util.Dom.get(id); | |
| 1081 | - // We are only concerned with list items, we | |
| 1082 | - // ignore the dragover | |
| 1083 | - // notifications for the list. | |
| 1084 | - if ($i("i3geo_lixeira") | |
| 1085 | - && id === "i3geo_lixeira") { | |
| 1086 | - $i("i3geo_lixeira").style.border = "1px solid red"; | |
| 1111 | + } | |
| 1112 | + // muda ordem de desenho do tema | |
| 1113 | + else { | |
| 1114 | + if (i3GEO.arvoreDeCamadas.ARRASTARORDEM === true) { | |
| 1115 | + destEl = Dom.get(id); | |
| 1116 | + destEl.appendChild(this.getEl()); | |
| 1117 | + els = i3GEO.arvoreDeCamadas.listaLigadosDesligados(); | |
| 1118 | + lista = els[2].join(","); | |
| 1119 | + temp = function(retorno) { | |
| 1120 | + i3GEO.atualiza(retorno); | |
| 1121 | + if (i3GEO.Interface.ATUAL === "openlayers") { | |
| 1122 | + i3GEO.Interface.openlayers.ordenaLayers(); | |
| 1123 | + } | |
| 1124 | + }; | |
| 1125 | + i3GEO.php.reordenatemas( | |
| 1126 | + temp, | |
| 1127 | + lista); | |
| 1087 | 1128 | } else { |
| 1088 | - destEl.style.textDecoration = "underline"; | |
| 1129 | + i3GEO.arvoreDeCamadas.atualiza( | |
| 1130 | + i3GEO.arvoreDeCamadas.CAMADAS, | |
| 1131 | + true); | |
| 1089 | 1132 | } |
| 1090 | - }, | |
| 1091 | - onDragOut : function(e, id) { | |
| 1092 | - $i(id).style.textDecoration = "none"; | |
| 1093 | 1133 | } |
| 1094 | - }); | |
| 1095 | - Event.onDOMReady(YAHOO.example.DDApp.init, YAHOO.example.DDApp, true); | |
| 1134 | + } | |
| 1135 | + } | |
| 1136 | + }, | |
| 1137 | + onDrag : function(e) { | |
| 1138 | + // Keep track of the direction of the drag for | |
| 1139 | + // use during onDragOver | |
| 1140 | + var y; | |
| 1141 | + y = Event.getPageY(e); | |
| 1142 | + if (y < this.lastY) { | |
| 1143 | + this.goingUp = true; | |
| 1144 | + } else if (y > this.lastY) { | |
| 1145 | + this.goingUp = false; | |
| 1146 | + } | |
| 1147 | + this.lastY = y; | |
| 1148 | + if (i3GEO.guias.TIPO === "movel") { | |
| 1149 | + YAHOO.util.Dom.setStyle( | |
| 1150 | + "i3GEOguiaMovelMolde", | |
| 1151 | + "opacity", | |
| 1152 | + 0.9); | |
| 1153 | + } | |
| 1154 | + }, | |
| 1155 | + onDragOver : function(e, id) { | |
| 1156 | + var destEl; | |
| 1157 | + destEl = YAHOO.util.Dom.get(id); | |
| 1158 | + // We are only concerned with list items, we | |
| 1159 | + // ignore the dragover | |
| 1160 | + // notifications for the list. | |
| 1161 | + if ($i("i3geo_lixeira") | |
| 1162 | + && id === "i3geo_lixeira") { | |
| 1163 | + $i("i3geo_lixeira").style.border = "1px solid red"; | |
| 1164 | + } else { | |
| 1165 | + destEl.style.textDecoration = "underline"; | |
| 1166 | + } | |
| 1167 | + }, | |
| 1168 | + onDragOut : function(e, id) { | |
| 1169 | + $i(id).style.textDecoration = "none"; | |
| 1170 | + } | |
| 1171 | + }); | |
| 1172 | + Event.onDOMReady( | |
| 1173 | + YAHOO.example.DDApp.init, | |
| 1174 | + YAHOO.example.DDApp, | |
| 1175 | + true); | |
| 1096 | 1176 | }, |
| 1097 | 1177 | /** |
| 1098 | 1178 | * Abre o segundo nível da árvore de temas, mostrando as |
| ... | ... | @@ -1112,8 +1192,7 @@ i3GEO.arvoreDeCamadas = { |
| 1112 | 1192 | |
| 1113 | 1193 | // YAHOO.log("Montando as opções da árvore de |
| 1114 | 1194 | // camadas", "i3geo"); |
| 1115 | - var opcoesNode, idtema, ltema, farol, mfarol, tnome = "", imb = i3GEO.util | |
| 1116 | - .$im("branco.gif"), funcoes = i3GEO.arvoreDeCamadas.FUNCOES; | |
| 1195 | + var opcoesNode, idtema, ltema, farol, mfarol, tnome = "", imb = i3GEO.util.$im("branco.gif"), funcoes = i3GEO.arvoreDeCamadas.FUNCOES; | |
| 1117 | 1196 | idtema = node.data.id; |
| 1118 | 1197 | ltema = i3GEO.arvoreDeCamadas.pegaTema(idtema); |
| 1119 | 1198 | if (i3GEO.arvoreDeCamadas.OPCOESICONES === true) { |
| ... | ... | @@ -1136,96 +1215,116 @@ i3GEO.arvoreDeCamadas = { |
| 1136 | 1215 | farol = "maisamarelo.png"; |
| 1137 | 1216 | mfarol = $trad("t11"); |
| 1138 | 1217 | } |
| 1139 | - tnome += " <img id='farol" + ltema.name + "' src='" | |
| 1140 | - + i3GEO.util.$im(farol) + "' title='" + mfarol + "' />"; | |
| 1218 | + tnome += " <img id='farol" | |
| 1219 | + + ltema.name | |
| 1220 | + + "' src='" | |
| 1221 | + + i3GEO.util.$im(farol) | |
| 1222 | + + "' title='" | |
| 1223 | + + mfarol | |
| 1224 | + + "' />"; | |
| 1141 | 1225 | } |
| 1142 | 1226 | if (funcoes.excluir === true) { |
| 1143 | 1227 | tnome += " <img id='idx" |
| 1144 | - + ltema.name | |
| 1145 | - + "' class='x' src='" | |
| 1146 | - + imb | |
| 1147 | - + "' title='" | |
| 1148 | - + $trad("t12") | |
| 1149 | - + "' onclick='i3GEO.tema.exclui(\"" | |
| 1150 | - + ltema.name | |
| 1151 | - + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1152 | - + $trad("t12a") | |
| 1153 | - + "','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1228 | + + ltema.name | |
| 1229 | + + "' class='x' src='" | |
| 1230 | + + imb | |
| 1231 | + + "' title='" | |
| 1232 | + + $trad("t12") | |
| 1233 | + + "' onclick='i3GEO.tema.exclui(\"" | |
| 1234 | + + ltema.name | |
| 1235 | + + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1236 | + + $trad("t12a") | |
| 1237 | + + "','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1154 | 1238 | } |
| 1155 | 1239 | if (funcoes.sobe === true) { |
| 1156 | 1240 | tnome += " <img class='sobe' src='" |
| 1157 | - + imb | |
| 1158 | - + "' title='" | |
| 1159 | - + $trad("t13") | |
| 1160 | - + "' onclick='i3GEO.tema.sobe(\"" | |
| 1161 | - + ltema.name | |
| 1162 | - + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1163 | - + $trad("t14") | |
| 1164 | - + "','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1241 | + + imb | |
| 1242 | + + "' title='" | |
| 1243 | + + $trad("t13") | |
| 1244 | + + "' onclick='i3GEO.tema.sobe(\"" | |
| 1245 | + + ltema.name | |
| 1246 | + + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1247 | + + $trad("t14") | |
| 1248 | + + "','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1165 | 1249 | } |
| 1166 | 1250 | if (funcoes.desce === true) { |
| 1167 | 1251 | tnome += " <img class='desce' src='" |
| 1168 | - + imb | |
| 1169 | - + "' title='" | |
| 1170 | - + $trad("t15") | |
| 1171 | - + "' onclick='i3GEO.tema.desce(\"" | |
| 1172 | - + ltema.name | |
| 1173 | - + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1174 | - + $trad("t16") | |
| 1175 | - + "','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1252 | + + imb | |
| 1253 | + + "' title='" | |
| 1254 | + + $trad("t15") | |
| 1255 | + + "' onclick='i3GEO.tema.desce(\"" | |
| 1256 | + + ltema.name | |
| 1257 | + + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1258 | + + $trad("t16") | |
| 1259 | + + "','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1176 | 1260 | } |
| 1177 | 1261 | if ((ltema.zoomtema.toLowerCase() === "sim") |
| 1178 | - && (funcoes.zoomtema === true)) { | |
| 1262 | + && (funcoes.zoomtema === true)) { | |
| 1179 | 1263 | tnome += " <img class='extent' src='" |
| 1180 | - + imb | |
| 1181 | - + "' title='" | |
| 1182 | - + $trad("t17") | |
| 1183 | - + "' onclick='i3GEO.tema.zoom(\"" | |
| 1184 | - + ltema.name | |
| 1185 | - + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1186 | - + $trad("t18") | |
| 1187 | - + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1264 | + + imb | |
| 1265 | + + "' title='" | |
| 1266 | + + $trad("t17") | |
| 1267 | + + "' onclick='i3GEO.tema.zoom(\"" | |
| 1268 | + + ltema.name | |
| 1269 | + + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1270 | + + $trad("t18") | |
| 1271 | + + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1188 | 1272 | } |
| 1189 | - if(tnome !== ""){ | |
| 1190 | - new YAHOO.widget.HTMLNode({ | |
| 1191 | - html : tnome, | |
| 1192 | - enableHighlight : false, | |
| 1193 | - isLeaf : true, | |
| 1194 | - expanded : false | |
| 1195 | - }, node); | |
| 1273 | + if (tnome !== "") { | |
| 1274 | + new YAHOO.widget.HTMLNode( | |
| 1275 | + { | |
| 1276 | + html : tnome, | |
| 1277 | + enableHighlight : false, | |
| 1278 | + isLeaf : true, | |
| 1279 | + expanded : false | |
| 1280 | + }, node); | |
| 1196 | 1281 | } |
| 1197 | 1282 | if (funcoes.compartilhar === true |
| 1198 | - && ltema.permitecomentario.toLowerCase() !== "nao") { | |
| 1199 | - temp = i3GEO.configura.locaplic + "/ms_criamapa.php?layers=" | |
| 1200 | - + ltema.name + "&temasa=" + ltema.name; | |
| 1201 | - tnome = i3GEO.social.compartilhar("", temp, temp, "semtotal"); | |
| 1202 | - iconesNode = new YAHOO.widget.HTMLNode({ | |
| 1203 | - html : tnome, | |
| 1204 | - enableHighlight : false, | |
| 1205 | - isLeaf : true, | |
| 1206 | - expanded : false | |
| 1207 | - }, node); | |
| 1283 | + && ltema.permitecomentario.toLowerCase() !== "nao") { | |
| 1284 | + temp = i3GEO.configura.locaplic | |
| 1285 | + + "/ms_criamapa.php?layers=" | |
| 1286 | + + ltema.name | |
| 1287 | + + "&temasa=" | |
| 1288 | + + ltema.name; | |
| 1289 | + tnome = i3GEO.social.compartilhar( | |
| 1290 | + "", | |
| 1291 | + temp, | |
| 1292 | + temp, | |
| 1293 | + "semtotal"); | |
| 1294 | + iconesNode = new YAHOO.widget.HTMLNode( | |
| 1295 | + { | |
| 1296 | + html : tnome, | |
| 1297 | + enableHighlight : false, | |
| 1298 | + isLeaf : true, | |
| 1299 | + expanded : false | |
| 1300 | + }, node); | |
| 1208 | 1301 | } |
| 1209 | 1302 | } |
| 1210 | 1303 | if (i3GEO.arvoreDeCamadas.OPCOESTEMAS === true) { |
| 1211 | - opcoesNode = new YAHOO.widget.HTMLNode({ | |
| 1212 | - html : $trad("t18a"), | |
| 1213 | - idopcoes : ltema.name, | |
| 1214 | - identifica : ltema.identifica, | |
| 1215 | - enableHighlight : true, | |
| 1216 | - expanded : false | |
| 1217 | - }, node); | |
| 1218 | - opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes, 1); | |
| 1304 | + opcoesNode = new YAHOO.widget.HTMLNode( | |
| 1305 | + { | |
| 1306 | + html : $trad("t18a"), | |
| 1307 | + idopcoes : ltema.name, | |
| 1308 | + identifica : ltema.identifica, | |
| 1309 | + enableHighlight : true, | |
| 1310 | + expanded : false | |
| 1311 | + }, node); | |
| 1312 | + opcoesNode.setDynamicLoad( | |
| 1313 | + i3GEO.arvoreDeCamadas.mostraOpcoes, | |
| 1314 | + 1); | |
| 1219 | 1315 | } |
| 1220 | 1316 | if (i3GEO.arvoreDeCamadas.OPCOESLEGENDA === true |
| 1221 | - && ltema.classe !== "NAO") { | |
| 1222 | - opcoesNode = new YAHOO.widget.HTMLNode({ | |
| 1223 | - html : $trad("p3"), | |
| 1224 | - idlegenda : ltema.name, | |
| 1225 | - enableHighlight : true, | |
| 1226 | - expanded : i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA | |
| 1227 | - }, node); | |
| 1228 | - opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda, 1); | |
| 1317 | + && ltema.classe !== "NAO") { | |
| 1318 | + opcoesNode = new YAHOO.widget.HTMLNode( | |
| 1319 | + { | |
| 1320 | + html : $trad("p3"), | |
| 1321 | + idlegenda : ltema.name, | |
| 1322 | + enableHighlight : true, | |
| 1323 | + expanded : i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA | |
| 1324 | + }, node); | |
| 1325 | + opcoesNode.setDynamicLoad( | |
| 1326 | + i3GEO.arvoreDeCamadas.mostraLegenda, | |
| 1327 | + 1); | |
| 1229 | 1328 | } |
| 1230 | 1329 | node.loadComplete(); |
| 1231 | 1330 | }, |
| ... | ... | @@ -1242,166 +1341,252 @@ i3GEO.arvoreDeCamadas = { |
| 1242 | 1341 | |
| 1243 | 1342 | // YAHOO.log("Mostrando as opções da árvore de |
| 1244 | 1343 | // camadas", "i3geo"); |
| 1245 | - var tnome, idtema = node.data.idopcoes, ltema = i3GEO.arvoreDeCamadas | |
| 1246 | - .pegaTema(idtema), funcoes = i3GEO.arvoreDeCamadas.FUNCOES; | |
| 1247 | - | |
| 1344 | + var tnome, idtema = node.data.idopcoes, ltema = i3GEO.arvoreDeCamadas.pegaTema(idtema), funcoes = i3GEO.arvoreDeCamadas.FUNCOES; | |
| 1248 | 1345 | |
| 1249 | 1346 | // |
| 1250 | - //ajusta as propriedades e funcoes caso a camada seja um plugin | |
| 1347 | + // ajusta as propriedades e funcoes caso a camada seja um plugin | |
| 1251 | 1348 | // |
| 1252 | 1349 | ltema = i3GEO.pluginI3geo.aplicaPropriedades(ltema); |
| 1253 | - //inclui no objeto o parametro de verificacao | |
| 1254 | - //e necessario clonar para nao alterar o original | |
| 1350 | + // inclui no objeto o parametro de verificacao | |
| 1351 | + // e necessario clonar para nao alterar o original | |
| 1255 | 1352 | funcoes = i3GEO.util.cloneObj(funcoes); |
| 1256 | 1353 | funcoes.plugini3geo = ltema.plugini3geo; |
| 1257 | 1354 | funcoes = i3GEO.pluginI3geo.aplicaPropriedades(funcoes); |
| 1258 | 1355 | |
| 1259 | 1356 | if (funcoes.opacidade === true) { |
| 1260 | 1357 | tnome = "<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" |
| 1261 | - + $trad("t19") | |
| 1262 | - + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >" | |
| 1263 | - + $trad("t20") | |
| 1264 | - + "</span> <a class=ajuda_usuario target=_blank href='" | |
| 1265 | - + i3GEO.configura.locaplic | |
| 1266 | - + "/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>" | |
| 1267 | - + "<br>" | |
| 1268 | - + $inputText("", "", "tr" + ltema.name, "", "3", | |
| 1269 | - ltema.transparency) | |
| 1270 | - + "<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\"" | |
| 1271 | - + ltema.name + "\")' src='" + i3GEO.util.$im("branco.gif") | |
| 1272 | - + "' />"; | |
| 1273 | - new YAHOO.widget.HTMLNode({ | |
| 1274 | - expanded : false, | |
| 1275 | - enableHighlight : false, | |
| 1276 | - isLeaf : true, | |
| 1277 | - html : tnome | |
| 1278 | - }, node); | |
| 1358 | + + $trad("t19") | |
| 1359 | + + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >" | |
| 1360 | + + $trad("t20") | |
| 1361 | + + "</span> <a class=ajuda_usuario target=_blank href='" | |
| 1362 | + + i3GEO.configura.locaplic | |
| 1363 | + + "/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>" | |
| 1364 | + + "<br>" | |
| 1365 | + + $inputText( | |
| 1366 | + "", | |
| 1367 | + "", | |
| 1368 | + "tr" | |
| 1369 | + + ltema.name, | |
| 1370 | + "", | |
| 1371 | + "3", | |
| 1372 | + ltema.transparency) | |
| 1373 | + + "<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\"" | |
| 1374 | + + ltema.name | |
| 1375 | + + "\")' src='" | |
| 1376 | + + i3GEO.util.$im("branco.gif") | |
| 1377 | + + "' />"; | |
| 1378 | + new YAHOO.widget.HTMLNode( | |
| 1379 | + { | |
| 1380 | + expanded : false, | |
| 1381 | + enableHighlight : false, | |
| 1382 | + isLeaf : true, | |
| 1383 | + html : tnome | |
| 1384 | + }, node); | |
| 1279 | 1385 | } |
| 1280 | 1386 | if (funcoes.temporizador === true) { |
| 1281 | 1387 | tnome = "<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" |
| 1282 | - + $trad("t47") | |
| 1283 | - + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >" | |
| 1284 | - + $trad("t48") | |
| 1285 | - + "</span> <a class=ajuda_usuario target=_blank href='" | |
| 1286 | - + i3GEO.configura.locaplic | |
| 1287 | - + "/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>" | |
| 1288 | - + "<br>" | |
| 1289 | - + $inputText("", "", "temporizador" + ltema.name, "", "3", | |
| 1290 | - ltema.temporizador) | |
| 1291 | - + "<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\"" | |
| 1292 | - + ltema.name + "\")' src='" + i3GEO.util.$im("branco.gif") | |
| 1293 | - + "' />"; | |
| 1294 | - new YAHOO.widget.HTMLNode({ | |
| 1295 | - expanded : false, | |
| 1296 | - enableHighlight : false, | |
| 1297 | - isLeaf : true, | |
| 1298 | - html : tnome | |
| 1299 | - }, node); | |
| 1388 | + + $trad("t47") | |
| 1389 | + + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >" | |
| 1390 | + + $trad("t48") | |
| 1391 | + + "</span> <a class=ajuda_usuario target=_blank href='" | |
| 1392 | + + i3GEO.configura.locaplic | |
| 1393 | + + "/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>" | |
| 1394 | + + "<br>" | |
| 1395 | + + $inputText( | |
| 1396 | + "", | |
| 1397 | + "", | |
| 1398 | + "temporizador" | |
| 1399 | + + ltema.name, | |
| 1400 | + "", | |
| 1401 | + "3", | |
| 1402 | + ltema.temporizador) | |
| 1403 | + + "<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\"" | |
| 1404 | + + ltema.name | |
| 1405 | + + "\")' src='" | |
| 1406 | + + i3GEO.util.$im("branco.gif") | |
| 1407 | + + "' />"; | |
| 1408 | + new YAHOO.widget.HTMLNode( | |
| 1409 | + { | |
| 1410 | + expanded : false, | |
| 1411 | + enableHighlight : false, | |
| 1412 | + isLeaf : true, | |
| 1413 | + html : tnome | |
| 1414 | + }, node); | |
| 1300 | 1415 | } |
| 1301 | 1416 | if (funcoes.mudanome === true) { |
| 1302 | 1417 | tnome = "<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" |
| 1303 | - + $trad("t21a") | |
| 1304 | - + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />" | |
| 1305 | - + $trad("t21") | |
| 1306 | - + " </span> <a class=ajuda_usuario target=_blank href='" | |
| 1307 | - + i3GEO.configura.locaplic | |
| 1308 | - + "/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>" | |
| 1309 | - + "<br>" | |
| 1310 | - + $inputText("", "", "nn" + ltema.name, "", "15", "") | |
| 1311 | - + "<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\"" | |
| 1312 | - + ltema.name + "\")' src='" + i3GEO.util.$im("branco.gif") | |
| 1313 | - + "' />"; | |
| 1314 | - new YAHOO.widget.HTMLNode({ | |
| 1315 | - expanded : false, | |
| 1316 | - enableHighlight : false, | |
| 1317 | - isLeaf : true, | |
| 1318 | - html : tnome | |
| 1319 | - }, node); | |
| 1418 | + + $trad("t21a") | |
| 1419 | + + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />" | |
| 1420 | + + $trad("t21") | |
| 1421 | + + " </span> <a class=ajuda_usuario target=_blank href='" | |
| 1422 | + + i3GEO.configura.locaplic | |
| 1423 | + + "/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>" | |
| 1424 | + + "<br>" | |
| 1425 | + + $inputText( | |
| 1426 | + "", | |
| 1427 | + "", | |
| 1428 | + "nn" | |
| 1429 | + + ltema.name, | |
| 1430 | + "", | |
| 1431 | + "15", | |
| 1432 | + "") | |
| 1433 | + + "<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\"" | |
| 1434 | + + ltema.name | |
| 1435 | + + "\")' src='" | |
| 1436 | + + i3GEO.util.$im("branco.gif") | |
| 1437 | + + "' />"; | |
| 1438 | + new YAHOO.widget.HTMLNode( | |
| 1439 | + { | |
| 1440 | + expanded : false, | |
| 1441 | + enableHighlight : false, | |
| 1442 | + isLeaf : true, | |
| 1443 | + html : tnome | |
| 1444 | + }, node); | |
| 1320 | 1445 | } |
| 1321 | 1446 | if (funcoes.copia === true) { |
| 1322 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("x100"), | |
| 1323 | - $trad("x101"), 'i3GEO.tema.copia(\"' + ltema.name + '\")', | |
| 1324 | - node); | |
| 1325 | - } | |
| 1326 | - if ((ltema.type < 3) && (ltema.connectiontype !== 7)) { | |
| 1447 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1448 | + $trad("x100"), | |
| 1449 | + $trad("x101"), | |
| 1450 | + 'i3GEO.tema.copia(\"' | |
| 1451 | + + ltema.name | |
| 1452 | + + '\")', | |
| 1453 | + node); | |
| 1454 | + } | |
| 1455 | + if ((ltema.type < 3) | |
| 1456 | + && (ltema.connectiontype !== 7)) { | |
| 1327 | 1457 | if (funcoes.procurar === true) { |
| 1328 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"), | |
| 1329 | - $trad("t23"), 'i3GEO.tema.dialogo.procuraratrib(\"' | |
| 1330 | - + ltema.name + '\")', node); | |
| 1458 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1459 | + $trad("t22"), | |
| 1460 | + $trad("t23"), | |
| 1461 | + 'i3GEO.tema.dialogo.procuraratrib(\"' | |
| 1462 | + + ltema.name | |
| 1463 | + + '\")', | |
| 1464 | + node); | |
| 1331 | 1465 | } |
| 1332 | 1466 | if (funcoes.toponimia === true) { |
| 1333 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"), | |
| 1334 | - $trad("t25"), 'i3GEO.tema.dialogo.toponimia(\"' | |
| 1335 | - + ltema.name + '\")', node); | |
| 1467 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1468 | + $trad("t24"), | |
| 1469 | + $trad("t25"), | |
| 1470 | + 'i3GEO.tema.dialogo.toponimia(\"' | |
| 1471 | + + ltema.name | |
| 1472 | + + '\")', | |
| 1473 | + node); | |
| 1336 | 1474 | } |
| 1337 | 1475 | if (funcoes.etiquetas === true |
| 1338 | - && (ltema.identifica.toLowerCase() === "sim" || ltema.identifica === "")) { | |
| 1339 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"), | |
| 1340 | - $trad("t27"), 'i3GEO.tema.dialogo.etiquetas(\"' | |
| 1341 | - + ltema.name + '\")', node); | |
| 1476 | + && (ltema.identifica.toLowerCase() === "sim" || ltema.identifica === "")) { | |
| 1477 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1478 | + $trad("t26"), | |
| 1479 | + $trad("t27"), | |
| 1480 | + 'i3GEO.tema.dialogo.etiquetas(\"' | |
| 1481 | + + ltema.name | |
| 1482 | + + '\")', | |
| 1483 | + node); | |
| 1342 | 1484 | } |
| 1343 | 1485 | if (funcoes.filtrar === true) { |
| 1344 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"), | |
| 1345 | - $trad("t29"), 'i3GEO.tema.dialogo.filtro(\"' | |
| 1346 | - + ltema.name + '\")', node); | |
| 1486 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1487 | + $trad("t28"), | |
| 1488 | + $trad("t29"), | |
| 1489 | + 'i3GEO.tema.dialogo.filtro(\"' | |
| 1490 | + + ltema.name | |
| 1491 | + + '\")', | |
| 1492 | + node); | |
| 1347 | 1493 | } |
| 1348 | 1494 | if (funcoes.tabela === true) { |
| 1349 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"), | |
| 1350 | - $trad("t31"), 'i3GEO.tema.dialogo.tabela(\"' | |
| 1351 | - + ltema.name + '\")', node); | |
| 1495 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1496 | + $trad("t30"), | |
| 1497 | + $trad("t31"), | |
| 1498 | + 'i3GEO.tema.dialogo.tabela(\"' | |
| 1499 | + + ltema.name | |
| 1500 | + + '\")', | |
| 1501 | + node); | |
| 1352 | 1502 | } |
| 1353 | - if (i3GEO.parametros.versaoms > 4 && funcoes.grafico === true) { | |
| 1354 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"), | |
| 1355 | - $trad("t37"), 'i3GEO.tema.dialogo.graficotema(\"' | |
| 1356 | - + ltema.name + '\")', node); | |
| 1503 | + if (i3GEO.parametros.versaoms > 4 | |
| 1504 | + && funcoes.grafico === true) { | |
| 1505 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1506 | + $trad("t37"), | |
| 1507 | + $trad("t37"), | |
| 1508 | + 'i3GEO.tema.dialogo.graficotema(\"' | |
| 1509 | + + ltema.name | |
| 1510 | + + '\")', | |
| 1511 | + node); | |
| 1357 | 1512 | } |
| 1358 | 1513 | } |
| 1359 | 1514 | if ((ltema.type < 4 || ltema.type === 8) |
| 1360 | - && funcoes.editorlegenda === true) { | |
| 1361 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"), $trad("t33"), | |
| 1362 | - 'i3GEO.tema.dialogo.editaLegenda(\"' + ltema.name + '\")', | |
| 1363 | - node); | |
| 1364 | - } | |
| 1365 | - if (funcoes.destacar === true && i3GEO.Interface.ATUAL !== "googlemaps" | |
| 1366 | - && i3GEO.Interface.ATUAL !== "googleearth") { | |
| 1367 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"), $trad("t35"), | |
| 1368 | - 'i3GEO.navega.destacaTema.inicia(\"' + ltema.name + '\")', | |
| 1369 | - node); | |
| 1515 | + && funcoes.editorlegenda === true) { | |
| 1516 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1517 | + $trad("t32"), | |
| 1518 | + $trad("t33"), | |
| 1519 | + 'i3GEO.tema.dialogo.editaLegenda(\"' | |
| 1520 | + + ltema.name | |
| 1521 | + + '\")', | |
| 1522 | + node); | |
| 1523 | + } | |
| 1524 | + if (funcoes.destacar === true | |
| 1525 | + && i3GEO.Interface.ATUAL !== "googlemaps" | |
| 1526 | + && i3GEO.Interface.ATUAL !== "googleearth") { | |
| 1527 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1528 | + $trad("t34"), | |
| 1529 | + $trad("t35"), | |
| 1530 | + 'i3GEO.navega.destacaTema.inicia(\"' | |
| 1531 | + + ltema.name | |
| 1532 | + + '\")', | |
| 1533 | + node); | |
| 1370 | 1534 | } |
| 1371 | 1535 | // as opções SLD foram migradas para a ferramenta de |
| 1372 | 1536 | // edição de legenda |
| 1373 | 1537 | // i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t38"),$trad("t39"),'i3GEO.tema.dialogo.sld(\"'+ltema.name+'\")',node); |
| 1374 | 1538 | // i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t43"),$trad("t43"),'i3GEO.tema.dialogo.aplicarsld(\"'+ltema.name+'\")',node); |
| 1375 | - if (funcoes.sql === true && ltema.editorsql.toLowerCase() === "sim") { | |
| 1376 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"), $trad("t41"), | |
| 1377 | - 'i3GEO.tema.dialogo.editorsql(\"' + ltema.name + '\")', | |
| 1378 | - node); | |
| 1539 | + if (funcoes.sql === true | |
| 1540 | + && ltema.editorsql.toLowerCase() === "sim") { | |
| 1541 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1542 | + $trad("t40"), | |
| 1543 | + $trad("t41"), | |
| 1544 | + 'i3GEO.tema.dialogo.editorsql(\"' | |
| 1545 | + + ltema.name | |
| 1546 | + + '\")', | |
| 1547 | + node); | |
| 1379 | 1548 | } |
| 1380 | 1549 | if (funcoes.comentar === true |
| 1381 | - && ltema.permitecomentario.toLowerCase() !== "nao" | |
| 1382 | - && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios === true) { | |
| 1383 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"), $trad("t45"), | |
| 1384 | - 'i3GEO.tema.dialogo.comentario(\"' + ltema.name + '\")', | |
| 1385 | - node); | |
| 1386 | - } | |
| 1387 | - if (funcoes.wms === true && ltema.permiteogc.toLowerCase() !== "nao") { | |
| 1388 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities", | |
| 1389 | - 'WMS-OGC', 'i3GEO.tema.dialogo.mostraWms(\"' + ltema.name | |
| 1390 | - + '\")', node); | |
| 1550 | + && ltema.permitecomentario.toLowerCase() !== "nao" | |
| 1551 | + && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios === true) { | |
| 1552 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1553 | + $trad("t45"), | |
| 1554 | + $trad("t45"), | |
| 1555 | + 'i3GEO.tema.dialogo.comentario(\"' | |
| 1556 | + + ltema.name | |
| 1557 | + + '\")', | |
| 1558 | + node); | |
| 1559 | + } | |
| 1560 | + if (funcoes.wms === true | |
| 1561 | + && ltema.permiteogc.toLowerCase() !== "nao") { | |
| 1562 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1563 | + "Getcapabilities", | |
| 1564 | + 'WMS-OGC', | |
| 1565 | + 'i3GEO.tema.dialogo.mostraWms(\"' | |
| 1566 | + + ltema.name | |
| 1567 | + + '\")', | |
| 1568 | + node); | |
| 1391 | 1569 | } |
| 1392 | 1570 | if (i3GEO.login.verificaCookieLogin() |
| 1393 | - && i3GEO.parametros.editor.toLowerCase() === "sim") { | |
| 1394 | - i3GEO.arvoreDeCamadas | |
| 1395 | - .adicionaOpcaoTema( | |
| 1396 | - $trad("t44"), | |
| 1397 | - "<span style=color:red title='Apenas usuários editores podem ver essa opção' >" | |
| 1398 | - + $trad("t44") + "</span>", | |
| 1399 | - 'i3GEO.tema.dialogo.salvaMapfile(\"' + ltema.name | |
| 1400 | - + '\")', node); | |
| 1571 | + && i3GEO.parametros.editor.toLowerCase() === "sim") { | |
| 1572 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1573 | + $trad("t44"), | |
| 1574 | + "<span style=color:red title='Apenas usuários editores podem ver essa opção' >" | |
| 1575 | + + $trad("t44") | |
| 1576 | + + "</span>", | |
| 1577 | + 'i3GEO.tema.dialogo.salvaMapfile(\"' | |
| 1578 | + + ltema.name | |
| 1579 | + + '\")', | |
| 1580 | + node); | |
| 1401 | 1581 | } |
| 1402 | 1582 | if (funcoes.tme === true) { |
| 1403 | - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"), $trad("t49"), | |
| 1404 | - 'i3GEO.tema.dialogo.tme(\"' + ltema.name + '\")', node); | |
| 1583 | + i3GEO.arvoreDeCamadas.adicionaOpcaoTema( | |
| 1584 | + $trad("t49"), | |
| 1585 | + $trad("t49"), | |
| 1586 | + 'i3GEO.tema.dialogo.tme(\"' | |
| 1587 | + + ltema.name | |
| 1588 | + + '\")', | |
| 1589 | + node); | |
| 1405 | 1590 | } |
| 1406 | 1591 | node.loadComplete(); |
| 1407 | 1592 | }, |
| ... | ... | @@ -1424,13 +1609,19 @@ i3GEO.arvoreDeCamadas = { |
| 1424 | 1609 | */ |
| 1425 | 1610 | adicionaOpcaoTema : function(dica, titulo, onclick, node) { |
| 1426 | 1611 | var tnome = "<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" |
| 1427 | - + dica + "','');\" onclick=" + onclick + ">" + titulo + " </a>"; | |
| 1428 | - new YAHOO.widget.HTMLNode({ | |
| 1429 | - html : tnome, | |
| 1430 | - enableHighlight : false, | |
| 1431 | - isLeaf : true, | |
| 1432 | - expanded : false | |
| 1433 | - }, node); | |
| 1612 | + + dica | |
| 1613 | + + "','');\" onclick=" | |
| 1614 | + + onclick | |
| 1615 | + + ">" | |
| 1616 | + + titulo | |
| 1617 | + + " </a>"; | |
| 1618 | + new YAHOO.widget.HTMLNode( | |
| 1619 | + { | |
| 1620 | + html : tnome, | |
| 1621 | + enableHighlight : false, | |
| 1622 | + isLeaf : true, | |
| 1623 | + expanded : false | |
| 1624 | + }, node); | |
| 1434 | 1625 | }, |
| 1435 | 1626 | /** |
| 1436 | 1627 | * Monta os nós filhos do nó "legenda" |
| ... | ... | @@ -1452,13 +1643,19 @@ i3GEO.arvoreDeCamadas = { |
| 1452 | 1643 | original = retorno; |
| 1453 | 1644 | retorno = retorno.data.legenda; |
| 1454 | 1645 | if (retorno[0]) { |
| 1455 | - if ((navn) && (!retorno[0].imagem)) { | |
| 1646 | + if ((navn) | |
| 1647 | + && (!retorno[0].imagem)) { | |
| 1456 | 1648 | tabela = retorno; |
| 1457 | 1649 | } else { |
| 1458 | 1650 | i = retorno[0].imagem; |
| 1459 | - re = new RegExp("tiff", "g"); | |
| 1460 | - i = i.replace(re, 'png'); | |
| 1461 | - tabela = "<img src='" + i + "' />"; | |
| 1651 | + re = new RegExp( | |
| 1652 | + "tiff", "g"); | |
| 1653 | + i = i.replace( | |
| 1654 | + re, | |
| 1655 | + 'png'); | |
| 1656 | + tabela = "<img src='" | |
| 1657 | + + i | |
| 1658 | + + "' />"; | |
| 1462 | 1659 | } |
| 1463 | 1660 | retorno = ""; |
| 1464 | 1661 | } else { |
| ... | ... | @@ -1470,11 +1667,13 @@ i3GEO.arvoreDeCamadas = { |
| 1470 | 1667 | if (linha >= 0) { |
| 1471 | 1668 | do { |
| 1472 | 1669 | colunas = linhas[linha].split("#"); |
| 1473 | - re = new RegExp("'", "g"); | |
| 1670 | + re = new RegExp( | |
| 1671 | + "'", "g"); | |
| 1474 | 1672 | tabela += "<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='" |
| 1475 | - + colunas[4] | |
| 1476 | - + "' </td><td style='text-align:left'>" | |
| 1477 | - + colunas[2] + "</td></tr>"; | |
| 1673 | + + colunas[4] | |
| 1674 | + + "' </td><td style='text-align:left'>" | |
| 1675 | + + colunas[2] | |
| 1676 | + + "</td></tr>"; | |
| 1478 | 1677 | } while (linha--); |
| 1479 | 1678 | } |
| 1480 | 1679 | tabela += "</table><br>"; |
| ... | ... | @@ -1483,22 +1682,31 @@ i3GEO.arvoreDeCamadas = { |
| 1483 | 1682 | } |
| 1484 | 1683 | } |
| 1485 | 1684 | } else { |
| 1486 | - tabela = "<img src='" + retorno.data[0].imagem + "' />"; | |
| 1685 | + tabela = "<img src='" | |
| 1686 | + + retorno.data[0].imagem | |
| 1687 | + + "' />"; | |
| 1487 | 1688 | } // o tema é um wms |
| 1488 | - incluir = "<div style='text-align:left' id='" + idtema + "verdiv" | |
| 1489 | - + "'>" + tabela + "</div>"; | |
| 1490 | - new YAHOO.widget.HTMLNode({ | |
| 1491 | - html : incluir, | |
| 1492 | - enableHighlight : false, | |
| 1493 | - expanded : false | |
| 1494 | - }, node); | |
| 1689 | + incluir = "<div style='text-align:left' id='" | |
| 1690 | + + idtema | |
| 1691 | + + "verdiv" | |
| 1692 | + + "'>" | |
| 1693 | + + tabela | |
| 1694 | + + "</div>"; | |
| 1695 | + new YAHOO.widget.HTMLNode( | |
| 1696 | + { | |
| 1697 | + html : incluir, | |
| 1698 | + enableHighlight : false, | |
| 1699 | + expanded : false | |
| 1700 | + }, node); | |
| 1495 | 1701 | node.loadComplete(); |
| 1496 | 1702 | // |
| 1497 | 1703 | // desliga os checkbox que foram desativados |
| 1498 | 1704 | // pega os objetos input |
| 1499 | 1705 | // |
| 1500 | - elementos = document.getElementById(idtema + "verdiv") | |
| 1501 | - .getElementsByTagName("input"); | |
| 1706 | + elementos = document.getElementById( | |
| 1707 | + idtema | |
| 1708 | + + "verdiv").getElementsByTagName( | |
| 1709 | + "input"); | |
| 1502 | 1710 | nelementos = elementos.length; |
| 1503 | 1711 | inputs = []; |
| 1504 | 1712 | i = 0; |
| ... | ... | @@ -1523,10 +1731,14 @@ i3GEO.arvoreDeCamadas = { |
| 1523 | 1731 | } |
| 1524 | 1732 | }; |
| 1525 | 1733 | if (i3GEO.arvoreDeCamadas.TEMPLATELEGENDA !== "") { |
| 1526 | - i3GEO.php.criaLegendaHTML(retorna, idtema, | |
| 1527 | - i3GEO.arvoreDeCamadas.TEMPLATELEGENDA); | |
| 1734 | + i3GEO.php.criaLegendaHTML( | |
| 1735 | + retorna, | |
| 1736 | + idtema, | |
| 1737 | + i3GEO.arvoreDeCamadas.TEMPLATELEGENDA); | |
| 1528 | 1738 | } else { |
| 1529 | - i3GEO.php.criaLegendaHTML(retorna, idtema); | |
| 1739 | + i3GEO.php.criaLegendaHTML( | |
| 1740 | + retorna, | |
| 1741 | + idtema); | |
| 1530 | 1742 | } |
| 1531 | 1743 | }, |
| 1532 | 1744 | /** |
| ... | ... | @@ -1546,15 +1758,22 @@ i3GEO.arvoreDeCamadas = { |
| 1546 | 1758 | console.info("i3GEO.arvoreDeCamadas.atualizaLegenda()"); |
| 1547 | 1759 | |
| 1548 | 1760 | var node; |
| 1549 | - if (document.getElementById(idtema + "verdiv")) { | |
| 1550 | - node = i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda", | |
| 1551 | - idtema); | |
| 1761 | + if (document.getElementById(idtema | |
| 1762 | + + "verdiv")) { | |
| 1763 | + node = i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty( | |
| 1764 | + "idlegenda", | |
| 1765 | + idtema); | |
| 1552 | 1766 | if (node) { |
| 1553 | 1767 | i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node); |
| 1554 | 1768 | this.mostraLegenda(node); |
| 1555 | 1769 | // atualiza as janelas individuais com as legendas de cada tema |
| 1556 | - if ($i("janelaLegenda" + idtema + "_corpo")) { | |
| 1557 | - i3GEO.tema.mostralegendajanela(idtema, "", "abrejanela"); | |
| 1770 | + if ($i("janelaLegenda" | |
| 1771 | + + idtema | |
| 1772 | + + "_corpo")) { | |
| 1773 | + i3GEO.tema.mostralegendajanela( | |
| 1774 | + idtema, | |
| 1775 | + "", | |
| 1776 | + "abrejanela"); | |
| 1558 | 1777 | } |
| 1559 | 1778 | } |
| 1560 | 1779 | } |
| ... | ... | @@ -1591,9 +1810,14 @@ i3GEO.arvoreDeCamadas = { |
| 1591 | 1810 | obj.idclasse = leg.value; |
| 1592 | 1811 | obj.onchange = function() { |
| 1593 | 1812 | var obj = $i("tempinputcorclasse"); |
| 1594 | - i3GEO.tema.alteracorclasse(obj.tema, obj.idclasse, obj.value); | |
| 1813 | + i3GEO.tema.alteracorclasse( | |
| 1814 | + obj.tema, | |
| 1815 | + obj.idclasse, | |
| 1816 | + obj.value); | |
| 1595 | 1817 | }; |
| 1596 | - i3GEO.util.abreCor("", "tempinputcorclasse"); | |
| 1818 | + i3GEO.util.abreCor( | |
| 1819 | + "", | |
| 1820 | + "tempinputcorclasse"); | |
| 1597 | 1821 | }, |
| 1598 | 1822 | /** |
| 1599 | 1823 | * Liga ou desliga uma classe da legenda. |
| ... | ... | @@ -1609,22 +1833,41 @@ i3GEO.arvoreDeCamadas = { |
| 1609 | 1833 | inverteStatusClasse : function(leg) { |
| 1610 | 1834 | var temp = function(retorno) { |
| 1611 | 1835 | i3GEO.atualiza(); |
| 1612 | - i3GEO.Interface.atualizaTema(retorno, leg.name); | |
| 1613 | - //obtem o objeto checkbox | |
| 1836 | + i3GEO.Interface.atualizaTema( | |
| 1837 | + retorno, | |
| 1838 | + leg.name); | |
| 1839 | + // obtem o objeto checkbox | |
| 1614 | 1840 | var ck = ""; |
| 1615 | - //verifica se existe o checkbox da legenda mostrada em outra janela | |
| 1616 | - //legendack_ e incluido via template da legenda | |
| 1617 | - if(leg.id && leg.id === "legendack_"+leg.name+"_"+leg.value){ | |
| 1618 | - ck = $i("liblegendack_"+leg.name+"_"+leg.value); | |
| 1841 | + // verifica se existe o checkbox da legenda mostrada em outra janela | |
| 1842 | + // legendack_ e incluido via template da legenda | |
| 1843 | + if (leg.id | |
| 1844 | + && leg.id === "legendack_" | |
| 1845 | + + leg.name | |
| 1846 | + + "_" | |
| 1847 | + + leg.value) { | |
| 1848 | + ck = $i("liblegendack_" | |
| 1849 | + + leg.name | |
| 1850 | + + "_" | |
| 1851 | + + leg.value); | |
| 1852 | + } else if (leg.id | |
| 1853 | + && leg.id === "liblegendack_" | |
| 1854 | + + leg.name | |
| 1855 | + + "_" | |
| 1856 | + + leg.value) { | |
| 1857 | + ck = $i("legendack_" | |
| 1858 | + + leg.name | |
| 1859 | + + "_" | |
| 1860 | + + leg.value); | |
| 1619 | 1861 | } |
| 1620 | - else if(leg.id && leg.id === "liblegendack_"+leg.name+"_"+leg.value){ | |
| 1621 | - ck = $i("legendack_"+leg.name+"_"+leg.value); | |
| 1622 | - } | |
| 1623 | - if(ck && ck != ""){ | |
| 1862 | + if (ck | |
| 1863 | + && ck != "") { | |
| 1624 | 1864 | ck.checked = leg.checked; |
| 1625 | 1865 | } |
| 1626 | 1866 | }; |
| 1627 | - i3GEO.php.inverteStatusClasse(temp, leg.name, leg.value); | |
| 1867 | + i3GEO.php.inverteStatusClasse( | |
| 1868 | + temp, | |
| 1869 | + leg.name, | |
| 1870 | + leg.value); | |
| 1628 | 1871 | }, |
| 1629 | 1872 | /** |
| 1630 | 1873 | * Monta o texto com o título do tema. Esse texto é o que |
| ... | ... | @@ -1650,64 +1893,79 @@ i3GEO.arvoreDeCamadas = { |
| 1650 | 1893 | // verifica se o filtro de camadas está ativo |
| 1651 | 1894 | // |
| 1652 | 1895 | if (this.FILTRO !== "") { |
| 1653 | - if (this.FILTRO === "desligados" && ck !== "") { | |
| 1896 | + if (this.FILTRO === "desligados" | |
| 1897 | + && ck !== "") { | |
| 1654 | 1898 | return ""; |
| 1655 | 1899 | } |
| 1656 | - if (this.FILTRO === "ligados" && ck === "") { | |
| 1900 | + if (this.FILTRO === "ligados" | |
| 1901 | + && ck === "") { | |
| 1657 | 1902 | return ""; |
| 1658 | 1903 | } |
| 1659 | 1904 | if (this.FILTRO === "selecionados" |
| 1660 | - && tema.sel.toLowerCase() !== "sim") { | |
| 1905 | + && tema.sel.toLowerCase() !== "sim") { | |
| 1661 | 1906 | return ""; |
| 1662 | 1907 | } |
| 1663 | 1908 | if (this.FILTRO === "download" |
| 1664 | - && tema.download.toLowerCase() !== "sim") { | |
| 1909 | + && tema.download.toLowerCase() !== "sim") { | |
| 1665 | 1910 | return ""; |
| 1666 | 1911 | } |
| 1667 | - if (this.FILTRO === "wms" && tema.connectiontype * 1 !== 7) { | |
| 1912 | + if (this.FILTRO === "wms" | |
| 1913 | + && tema.connectiontype * 1 !== 7) { | |
| 1668 | 1914 | return ""; |
| 1669 | 1915 | } |
| 1670 | - if (this.FILTRO === "raster" && tema.type * 1 !== 3) { | |
| 1916 | + if (this.FILTRO === "raster" | |
| 1917 | + && tema.type * 1 !== 3) { | |
| 1671 | 1918 | return ""; |
| 1672 | 1919 | } |
| 1673 | - if (this.FILTRO === "toponimia" && tema.type * 1 !== 4) { | |
| 1920 | + if (this.FILTRO === "toponimia" | |
| 1921 | + && tema.type * 1 !== 4) { | |
| 1674 | 1922 | return ""; |
| 1675 | 1923 | } |
| 1676 | 1924 | } |
| 1677 | - estilo = navm ? "text-align:left;font-size:11px;vertical-align:middle;display:table-cell;" | |
| 1678 | - : "text-align:left;font-size:11px;vertical-align:top;"; | |
| 1679 | - html = "<p onclick='i3GEO.mapa.ativaTema(\"" + tema.name | |
| 1680 | - + "\")' id='arrastar_" + tema.name + "' style='" + estilo | |
| 1681 | - + "' >"; | |
| 1682 | - estilo = navm ? "cursor:pointer;vertical-align:15%;" | |
| 1683 | - : "cursor:pointer;"; | |
| 1925 | + estilo = navm ? "text-align:left;font-size:11px;vertical-align:middle;display:table-cell;" : "text-align:left;font-size:11px;vertical-align:top;"; | |
| 1926 | + html = "<p onclick='i3GEO.mapa.ativaTema(\"" | |
| 1927 | + + tema.name | |
| 1928 | + + "\")' id='arrastar_" | |
| 1929 | + + tema.name | |
| 1930 | + + "' style='" | |
| 1931 | + + estilo | |
| 1932 | + + "' >"; | |
| 1933 | + estilo = navm ? "cursor:pointer;vertical-align:15%;" : "cursor:pointer;"; | |
| 1684 | 1934 | html += "<input class=inputsb style='" |
| 1685 | - + estilo | |
| 1686 | - + "' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1687 | - + $trad("t3") | |
| 1688 | - + "','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='" | |
| 1689 | - + tema.name + "' " + ck; | |
| 1935 | + + estilo | |
| 1936 | + + "' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1937 | + + $trad("t3") | |
| 1938 | + + "','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='" | |
| 1939 | + + tema.name | |
| 1940 | + + "' " | |
| 1941 | + + ck; | |
| 1690 | 1942 | if (i3GEO.arvoreDeCamadas.ATIVATEMA !== "") { |
| 1691 | - html += "onclick=\"" + i3GEO.arvoreDeCamadas.ATIVATEMA + "\""; | |
| 1943 | + html += "onclick=\"" | |
| 1944 | + + i3GEO.arvoreDeCamadas.ATIVATEMA | |
| 1945 | + + "\""; | |
| 1692 | 1946 | } else { |
| 1693 | 1947 | html += "onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\"" |
| 1694 | - + $trad("p14") + "\",\"i3geoBotaoAplicarCamadas\",this)'"; | |
| 1948 | + + $trad("p14") | |
| 1949 | + + "\",\"i3geoBotaoAplicarCamadas\",this)'"; | |
| 1695 | 1950 | } |
| 1696 | 1951 | html += " />"; |
| 1697 | 1952 | // |
| 1698 | 1953 | // inclui icone do tema |
| 1699 | 1954 | // |
| 1700 | - estilo = navm ? "cursor:pointer;vertical-align:35%;padding-top:0px;" | |
| 1701 | - : "cursor:pointer;vertical-align:20%;position:relative;top:2px;"; | |
| 1702 | - if (tema.iconetema !== "" && i3GEO.arvoreDeCamadas.ICONETEMA === true) { | |
| 1703 | - html += " <img style='" + estilo + "' src='" + tema.iconetema | |
| 1704 | - + "' />"; | |
| 1955 | + estilo = navm ? "cursor:pointer;vertical-align:35%;padding-top:0px;" : "cursor:pointer;vertical-align:20%;position:relative;top:2px;"; | |
| 1956 | + if (tema.iconetema !== "" | |
| 1957 | + && i3GEO.arvoreDeCamadas.ICONETEMA === true) { | |
| 1958 | + html += " <img style='" | |
| 1959 | + + estilo | |
| 1960 | + + "' src='" | |
| 1961 | + + tema.iconetema | |
| 1962 | + + "' />"; | |
| 1705 | 1963 | } |
| 1706 | 1964 | tema.AGUARDALEGENDA = i3GEO.arvoreDeCamadas.AGUARDALEGENDA; |
| 1707 | 1965 | // |
| 1708 | - //ajusta as propriedades conforme as caracteristicas de cada plugin | |
| 1709 | - //verifica se o tema e do tipo plugin antes | |
| 1710 | - //nao e necessario clonar | |
| 1966 | + // ajusta as propriedades conforme as caracteristicas de cada plugin | |
| 1967 | + // verifica se o tema e do tipo plugin antes | |
| 1968 | + // nao e necessario clonar | |
| 1711 | 1969 | // |
| 1712 | 1970 | tema = i3GEO.pluginI3geo.aplicaPropriedades(tema); |
| 1713 | 1971 | // |
| ... | ... | @@ -1715,101 +1973,106 @@ i3GEO.arvoreDeCamadas = { |
| 1715 | 1973 | // |
| 1716 | 1974 | if (tema.contextoescala.toLowerCase() === "sim") { |
| 1717 | 1975 | html += " <img style='" |
| 1718 | - + estilo | |
| 1719 | - + "' src=" | |
| 1720 | - + iu.$im("contextoescala.png") | |
| 1721 | - + " title='" | |
| 1722 | - + $trad("t36") | |
| 1723 | - + "' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1724 | - + $trad("t36") | |
| 1725 | - + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1976 | + + estilo | |
| 1977 | + + "' src=" | |
| 1978 | + + iu.$im("contextoescala.png") | |
| 1979 | + + " title='" | |
| 1980 | + + $trad("t36") | |
| 1981 | + + "' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1982 | + + $trad("t36") | |
| 1983 | + + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1726 | 1984 | } |
| 1727 | 1985 | if (tema.sel.toLowerCase() === "sim") { |
| 1728 | 1986 | html += " <img style='" |
| 1729 | - + estilo | |
| 1730 | - + "' src=" | |
| 1731 | - + iu.$im("estasel.png") | |
| 1732 | - + " title='" | |
| 1733 | - + $trad("t4") | |
| 1734 | - + "' onclick='i3GEO.tema.limpasel(\"" | |
| 1735 | - + tema.name | |
| 1736 | - + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1737 | - + $trad("t5") | |
| 1738 | - + "','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1987 | + + estilo | |
| 1988 | + + "' src=" | |
| 1989 | + + iu.$im("estasel.png") | |
| 1990 | + + " title='" | |
| 1991 | + + $trad("t4") | |
| 1992 | + + "' onclick='i3GEO.tema.limpasel(\"" | |
| 1993 | + + tema.name | |
| 1994 | + + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1995 | + + $trad("t5") | |
| 1996 | + + "','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1739 | 1997 | html += " <img style='" |
| 1740 | - + estilo | |
| 1741 | - + "' src=" | |
| 1742 | - + iu.$im("zoomsel.gif") | |
| 1743 | - + " title='" | |
| 1744 | - + $trad("t4a") | |
| 1745 | - + "' onclick='i3GEO.tema.zoomsel(\"" | |
| 1746 | - + tema.name | |
| 1747 | - + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1748 | - + $trad("t5") | |
| 1749 | - + "','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1998 | + + estilo | |
| 1999 | + + "' src=" | |
| 2000 | + + iu.$im("zoomsel.gif") | |
| 2001 | + + " title='" | |
| 2002 | + + $trad("t4a") | |
| 2003 | + + "' onclick='i3GEO.tema.zoomsel(\"" | |
| 2004 | + + tema.name | |
| 2005 | + + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 2006 | + + $trad("t5") | |
| 2007 | + + "','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1750 | 2008 | } |
| 1751 | 2009 | // fonte |
| 1752 | 2010 | if (i3GEO.arvoreDeCamadas.FUNCOES.fonte === true |
| 1753 | - && tema.features.toLowerCase() !== "sim" | |
| 1754 | - && tema.name != "mundo") { | |
| 2011 | + && tema.features.toLowerCase() !== "sim" | |
| 2012 | + && tema.name != "mundo") { | |
| 1755 | 2013 | html += " <img class='ajuda_usuario' style='top:-2px;' src='" |
| 1756 | - + i3GEO.util.$im("branco.gif") | |
| 1757 | - + "' title='" | |
| 1758 | - + $trad("a9") | |
| 1759 | - + "' onclick='i3GEO.tema.fonte(\"" | |
| 1760 | - + tema.name | |
| 1761 | - + "\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1762 | - + $trad("a9") | |
| 1763 | - + "','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 2014 | + + i3GEO.util.$im("branco.gif") | |
| 2015 | + + "' title='" | |
| 2016 | + + $trad("a9") | |
| 2017 | + + "' onclick='i3GEO.tema.fonte(\"" | |
| 2018 | + + tema.name | |
| 2019 | + + "\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 2020 | + + $trad("a9") | |
| 2021 | + + "','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1764 | 2022 | } |
| 1765 | 2023 | // manter a lógica de exigir sim ao invés de vazio |
| 1766 | - if (tema.download.toLowerCase() === "sim" || tema.download === "" | |
| 1767 | - && tema.features.toLowerCase() !== "sim") { | |
| 2024 | + if (tema.download.toLowerCase() === "sim" | |
| 2025 | + || tema.download === "" | |
| 2026 | + && tema.features.toLowerCase() !== "sim") { | |
| 1768 | 2027 | html += " <img style='" |
| 1769 | - + estilo | |
| 1770 | - + "' src=" | |
| 1771 | - + iu.$im("down1.gif") | |
| 1772 | - + " title='download' onclick='i3GEO.tema.dialogo.download(\"" | |
| 1773 | - + tema.name | |
| 1774 | - + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1775 | - + $trad("t6") | |
| 1776 | - + "','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 1777 | - } | |
| 1778 | - estilo = navm ? "cursor:move;vertical-align:35%;padding-top:0px;color:black;" | |
| 1779 | - : "cursor:move;vertical-align:20%;color:black;"; | |
| 2028 | + + estilo | |
| 2029 | + + "' src=" | |
| 2030 | + + iu.$im("down1.gif") | |
| 2031 | + + " title='download' onclick='i3GEO.tema.dialogo.download(\"" | |
| 2032 | + + tema.name | |
| 2033 | + + "\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 2034 | + + $trad("t6") | |
| 2035 | + + "','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | |
| 2036 | + } | |
| 2037 | + estilo = navm ? "cursor:move;vertical-align:35%;padding-top:0px;color:black;" : "cursor:move;vertical-align:20%;color:black;"; | |
| 1780 | 2038 | if (tema.AGUARDALEGENDA) { |
| 1781 | 2039 | html += " <span id='ArvoreTituloTema" |
| 1782 | - + tema.name | |
| 1783 | - + "' style='position:relative;top:2px;" | |
| 1784 | - + estilo | |
| 1785 | - + "' onclick=\"i3GEO.tema.mostralegendajanela('" | |
| 1786 | - + tema.name | |
| 1787 | - + "','" | |
| 1788 | - + tema.tema | |
| 1789 | - + "','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1790 | - + $trad("t7a") | |
| 1791 | - + "','');i3GEO.tema.mostralegendajanela('" | |
| 1792 | - + tema.name | |
| 1793 | - + "','" | |
| 1794 | - + tema.tema | |
| 1795 | - + "','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('" | |
| 1796 | - + tema.name + "','','desativatimer');\" >" + tema.tema | |
| 1797 | - + "</span>"; | |
| 2040 | + + tema.name | |
| 2041 | + + "' style='position:relative;top:2px;" | |
| 2042 | + + estilo | |
| 2043 | + + "' onclick=\"i3GEO.tema.mostralegendajanela('" | |
| 2044 | + + tema.name | |
| 2045 | + + "','" | |
| 2046 | + + tema.tema | |
| 2047 | + + "','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 2048 | + + $trad("t7a") | |
| 2049 | + + "','');i3GEO.tema.mostralegendajanela('" | |
| 2050 | + + tema.name | |
| 2051 | + + "','" | |
| 2052 | + + tema.tema | |
| 2053 | + + "','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('" | |
| 2054 | + + tema.name | |
| 2055 | + + "','','desativatimer');\" >" | |
| 2056 | + + tema.tema | |
| 2057 | + + "</span>"; | |
| 1798 | 2058 | } else { |
| 1799 | 2059 | html += " <span id='ArvoreTituloTema" |
| 1800 | - + tema.name | |
| 1801 | - + "' style='" | |
| 1802 | - + estilo | |
| 1803 | - + "' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 1804 | - + $trad("t7") | |
| 1805 | - + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >" | |
| 1806 | - + tema.tema + "</span>"; | |
| 2060 | + + tema.name | |
| 2061 | + + "' style='" | |
| 2062 | + + estilo | |
| 2063 | + + "' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('" | |
| 2064 | + + $trad("t7") | |
| 2065 | + + "','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >" | |
| 2066 | + + tema.tema | |
| 2067 | + + "</span>"; | |
| 1807 | 2068 | } |
| 1808 | 2069 | html += "</p>"; |
| 1809 | 2070 | |
| 1810 | 2071 | if (i3GEO.tema.TEMPORIZADORESID[tema.name] == undefined |
| 1811 | - && tema.temporizador != "") { | |
| 1812 | - i3GEO.tema.temporizador(tema.name, tema.temporizador); | |
| 2072 | + && tema.temporizador != "") { | |
| 2073 | + i3GEO.tema.temporizador( | |
| 2074 | + tema.name, | |
| 2075 | + tema.temporizador); | |
| 1813 | 2076 | } |
| 1814 | 2077 | |
| 1815 | 2078 | return (html); |
| ... | ... | @@ -1832,7 +2095,7 @@ i3GEO.arvoreDeCamadas = { |
| 1832 | 2095 | // YAHOO.log("Atualizando o farol da árvore de camadas", |
| 1833 | 2096 | // "i3geo"); |
| 1834 | 2097 | var farol, l, ltema, escala, iu = i3GEO.util, im = i3GEO.configura.locaplic |
| 1835 | - + "/imagens/", camadas = i3GEO.arvoreDeCamadas.CAMADAS; | |
| 2098 | + + "/imagens/", camadas = i3GEO.arvoreDeCamadas.CAMADAS; | |
| 1836 | 2099 | farol = "maisamarelo.png"; |
| 1837 | 2100 | l = camadas.length - 1; |
| 1838 | 2101 | if (l >= 0) { |
| ... | ... | @@ -1848,7 +2111,12 @@ i3GEO.arvoreDeCamadas = { |
| 1848 | 2111 | if (escala * 1 === 0) { |
| 1849 | 2112 | farol = "maisamarelo.png"; |
| 1850 | 2113 | } |
| 1851 | - iu.defineValor("farol" + ltema.name, "src", im + farol); | |
| 2114 | + iu.defineValor( | |
| 2115 | + "farol" | |
| 2116 | + + ltema.name, | |
| 2117 | + "src", | |
| 2118 | + im | |
| 2119 | + + farol); | |
| 1852 | 2120 | } while (l--); |
| 1853 | 2121 | } |
| 1854 | 2122 | }, |
| ... | ... | @@ -1877,15 +2145,25 @@ i3GEO.arvoreDeCamadas = { |
| 1877 | 2145 | } |
| 1878 | 2146 | if (tipo === "ligartodos") { |
| 1879 | 2147 | t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca"); |
| 1880 | - if (i3GEO.util.in_array(i3GEO.Interface.ATUAL, [ "googleearth", | |
| 1881 | - "openlayers", "googlemaps" ])) { | |
| 2148 | + if (i3GEO.util.in_array( | |
| 2149 | + i3GEO.Interface.ATUAL, | |
| 2150 | + [ | |
| 2151 | + "googleearth", | |
| 2152 | + "openlayers", | |
| 2153 | + "googlemaps" | |
| 2154 | + ])) { | |
| 1882 | 2155 | return; |
| 1883 | 2156 | } |
| 1884 | 2157 | } |
| 1885 | 2158 | if (tipo === "desligartodos") { |
| 1886 | 2159 | t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca"); |
| 1887 | - if (i3GEO.util.in_array(i3GEO.Interface.ATUAL, [ "googleearth", | |
| 1888 | - "openlayers", "googlemaps" ])) { | |
| 2160 | + if (i3GEO.util.in_array( | |
| 2161 | + i3GEO.Interface.ATUAL, | |
| 2162 | + [ | |
| 2163 | + "googleearth", | |
| 2164 | + "openlayers", | |
| 2165 | + "googlemaps" | |
| 2166 | + ])) { | |
| 1889 | 2167 | return; |
| 1890 | 2168 | } |
| 1891 | 2169 | } |
| ... | ... | @@ -1897,15 +2175,24 @@ i3GEO.arvoreDeCamadas = { |
| 1897 | 2175 | i3GEO.janela.fechaAguarde("redesenha"); |
| 1898 | 2176 | }; |
| 1899 | 2177 | if (tipo === "normal") { |
| 1900 | - i3GEO.php.ligatemas(temp, t[1].toString(), t[0].toString()); | |
| 2178 | + i3GEO.php.ligatemas( | |
| 2179 | + temp, | |
| 2180 | + t[1].toString(), | |
| 2181 | + t[0].toString()); | |
| 1901 | 2182 | return; |
| 1902 | 2183 | } |
| 1903 | 2184 | if (tipo === "ligartodos") { |
| 1904 | - i3GEO.php.ligatemas(temp, "", t[2].toString()); | |
| 2185 | + i3GEO.php.ligatemas( | |
| 2186 | + temp, | |
| 2187 | + "", | |
| 2188 | + t[2].toString()); | |
| 1905 | 2189 | return; |
| 1906 | 2190 | } |
| 1907 | 2191 | if (tipo === "desligartodos") { |
| 1908 | - i3GEO.php.ligatemas(temp, t[2].toString(), ""); | |
| 2192 | + i3GEO.php.ligatemas( | |
| 2193 | + temp, | |
| 2194 | + t[2].toString(), | |
| 2195 | + ""); | |
| 1909 | 2196 | } |
| 1910 | 2197 | }, |
| 1911 | 2198 | /** |
| ... | ... | @@ -1927,7 +2214,11 @@ i3GEO.arvoreDeCamadas = { |
| 1927 | 2214 | */ |
| 1928 | 2215 | listaLigadosDesligados : function(tipo) { |
| 1929 | 2216 | if (!$i(i3GEO.arvoreDeCamadas.IDHTML)) { |
| 1930 | - return [ [], [], [] ]; | |
| 2217 | + return [ | |
| 2218 | + [], | |
| 2219 | + [], | |
| 2220 | + [] | |
| 2221 | + ]; | |
| 1931 | 2222 | } |
| 1932 | 2223 | if (arguments.length === 0) { |
| 1933 | 2224 | tipo = "manter"; |
| ... | ... | @@ -1935,8 +2226,9 @@ i3GEO.arvoreDeCamadas = { |
| 1935 | 2226 | if (typeof (console) !== 'undefined') |
| 1936 | 2227 | console.info("i3GEO.arvoreDeCamadas.listaLigadosDesligados()"); |
| 1937 | 2228 | |
| 1938 | - var no, cs, csn, j, c, nos = i3GEO.arvoreDeCamadas.ARVORE | |
| 1939 | - .getNodesByProperty("tipo", "tema"), ligados = [], desligados = [], todos = [], n = nos.length, i = 0, ATUAL = i3GEO.Interface.ATUAL; | |
| 2229 | + var no, cs, csn, j, c, nos = i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty( | |
| 2230 | + "tipo", | |
| 2231 | + "tema"), ligados = [], desligados = [], todos = [], n = nos.length, i = 0, ATUAL = i3GEO.Interface.ATUAL; | |
| 1940 | 2232 | do { |
| 1941 | 2233 | try { |
| 1942 | 2234 | no = nos[i].getEl(); |
| ... | ... | @@ -1945,20 +2237,29 @@ i3GEO.arvoreDeCamadas = { |
| 1945 | 2237 | for (j = 0; j < csn; j += 1) { |
| 1946 | 2238 | c = cs[j]; |
| 1947 | 2239 | if (c.name === "layer") { |
| 1948 | - c.checked === true ? ligados.push(c.value) : desligados | |
| 1949 | - .push(c.value); | |
| 2240 | + c.checked === true ? ligados.push(c.value) : desligados.push(c.value); | |
| 1950 | 2241 | todos.push(c.value); |
| 1951 | 2242 | if (tipo === "marca") { |
| 1952 | 2243 | c.checked = true; |
| 1953 | - if (i3GEO.util.in_array(ATUAL, [ "googleearth", | |
| 1954 | - "openlayers", "googlemaps" ])) { | |
| 2244 | + if (i3GEO.util.in_array( | |
| 2245 | + ATUAL, | |
| 2246 | + [ | |
| 2247 | + "googleearth", | |
| 2248 | + "openlayers", | |
| 2249 | + "googlemaps" | |
| 2250 | + ])) { | |
| 1955 | 2251 | i3GEO.Interface[ATUAL].ligaDesliga(c); |
| 1956 | 2252 | } |
| 1957 | 2253 | } |
| 1958 | 2254 | if (tipo === "desmarca") { |
| 1959 | 2255 | c.checked = false; |
| 1960 | - if (i3GEO.util.in_array(ATUAL, [ "googleearth", | |
| 1961 | - "openlayers", "googlemaps" ])) { | |
| 2256 | + if (i3GEO.util.in_array( | |
| 2257 | + ATUAL, | |
| 2258 | + [ | |
| 2259 | + "googleearth", | |
| 2260 | + "openlayers", | |
| 2261 | + "googlemaps" | |
| 2262 | + ])) { | |
| 1962 | 2263 | i3GEO.Interface[ATUAL].ligaDesliga(c); |
| 1963 | 2264 | } |
| 1964 | 2265 | } |
| ... | ... | @@ -1969,7 +2270,11 @@ i3GEO.arvoreDeCamadas = { |
| 1969 | 2270 | i += 1; |
| 1970 | 2271 | } |
| 1971 | 2272 | } while (i < n); |
| 1972 | - return ([ ligados, desligados, todos ]); | |
| 2273 | + return ([ | |
| 2274 | + ligados, | |
| 2275 | + desligados, | |
| 2276 | + todos | |
| 2277 | + ]); | |
| 1973 | 2278 | }, |
| 1974 | 2279 | /** |
| 1975 | 2280 | * Function: capturaCheckBox |
| ... | ... | @@ -1991,7 +2296,9 @@ i3GEO.arvoreDeCamadas = { |
| 1991 | 2296 | return; |
| 1992 | 2297 | } |
| 1993 | 2298 | var nos, n, i, no, cs, csn, j, c; |
| 1994 | - nos = i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo", "tema"); | |
| 2299 | + nos = i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty( | |
| 2300 | + "tipo", | |
| 2301 | + "tema"); | |
| 1995 | 2302 | n = nos.length; |
| 1996 | 2303 | i = 0; |
| 1997 | 2304 | do { |
| ... | ... | @@ -2001,7 +2308,8 @@ i3GEO.arvoreDeCamadas = { |
| 2001 | 2308 | csn = cs.length; |
| 2002 | 2309 | for (j = 0; j < csn; j += 1) { |
| 2003 | 2310 | c = cs[j]; |
| 2004 | - if (c.name === "layer" && c.value === tema) { | |
| 2311 | + if (c.name === "layer" | |
| 2312 | + && c.value === tema) { | |
| 2005 | 2313 | return c; |
| 2006 | 2314 | } |
| 2007 | 2315 | } |
| ... | ... | @@ -2074,7 +2382,8 @@ i3GEO.arvoreDeCamadas = { |
| 2074 | 2382 | */ |
| 2075 | 2383 | pegaTema : function(valor, camadas, parametro) { |
| 2076 | 2384 | var i; |
| 2077 | - if (!camadas || camadas == "") { | |
| 2385 | + if (!camadas | |
| 2386 | + || camadas == "") { | |
| 2078 | 2387 | camadas = i3GEO.arvoreDeCamadas.CAMADAS; |
| 2079 | 2388 | } else { |
| 2080 | 2389 | // converte o objeto camadas para a forma valida caso contenha a |
| ... | ... | @@ -2191,11 +2500,14 @@ i3GEO.arvoreDeCamadas = { |
| 2191 | 2500 | temp = ltema.exttema; |
| 2192 | 2501 | |
| 2193 | 2502 | if (temp !== "") { |
| 2194 | - if (i3GEO.util.intersectaBox(temp, | |
| 2195 | - i3GEO.parametros.mapexten) === false) { | |
| 2196 | - $i("ArvoreTituloTema" + ltema.name).style.color = "gray"; | |
| 2503 | + if (i3GEO.util.intersectaBox( | |
| 2504 | + temp, | |
| 2505 | + i3GEO.parametros.mapexten) === false) { | |
| 2506 | + $i("ArvoreTituloTema" | |
| 2507 | + + ltema.name).style.color = "gray"; | |
| 2197 | 2508 | } else { |
| 2198 | - $i("ArvoreTituloTema" + ltema.name).style.color = "black"; | |
| 2509 | + $i("ArvoreTituloTema" | |
| 2510 | + + ltema.name).style.color = "black"; | |
| 2199 | 2511 | } |
| 2200 | 2512 | } |
| 2201 | 2513 | i += 1; |
| ... | ... | @@ -2274,7 +2586,12 @@ i3GEO.arvoreDeCamadas = { |
| 2274 | 2586 | * alterar o filtro aplicado a árvore |
| 2275 | 2587 | */ |
| 2276 | 2588 | filtro : function() { |
| 2277 | - i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()"); | |
| 2589 | + i3GEO.util.dialogoFerramenta( | |
| 2590 | + "i3GEO.arvoreDeCamadas.dialogo.filtro()", | |
| 2591 | + "filtroarvore", | |
| 2592 | + "filtroarvore", | |
| 2593 | + "dependencias.php", | |
| 2594 | + "i3GEOF.filtroarvore.iniciaJanelaFlutuante()"); | |
| 2278 | 2595 | }, |
| 2279 | 2596 | /** |
| 2280 | 2597 | * Function: dialogo.excluir Abre a janela de diálogo para o |
| ... | ... | @@ -2283,8 +2600,9 @@ i3GEO.arvoreDeCamadas = { |
| 2283 | 2600 | */ |
| 2284 | 2601 | excluir : function() { |
| 2285 | 2602 | i3GEO.util.dialogoFerramenta( |
| 2286 | - "i3GEO.arvoreDeCamadas.dialogo.excluir()", "excluirarvore", | |
| 2287 | - "excluirarvore"); | |
| 2603 | + "i3GEO.arvoreDeCamadas.dialogo.excluir()", | |
| 2604 | + "excluirarvore", | |
| 2605 | + "excluirarvore"); | |
| 2288 | 2606 | } |
| 2289 | 2607 | } |
| 2290 | 2608 | }; | ... | ... |
classesjs/compactados/classe_arvoredecamadas_compacto.js
| 1 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",FINALIZA:"",finaliza:"",ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},CAMADAS:"",CAMADASINICIAIS:"",SID:null,LOCAPLIC:null,cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("t1")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,idlegenda:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),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(this.REFRESH===true){ins+="<img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"}if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tnome!==""){new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:true,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:true,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;ltema=i3GEO.pluginI3geo.aplicaPropriedades(ltema);funcoes=i3GEO.util.cloneObj(funcoes);funcoes.plugini3geo=ltema.plugini3geo;funcoes=i3GEO.pluginI3geo.aplicaPropriedades(funcoes);if(funcoes.opacidade===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+"<br>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+"<br>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+"<br>"+$inputText("","","nn"+ltema.name,"","15","")+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.copia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("x100"),$trad("x101"),'i3GEO.tema.copia(\"'+ltema.name+'\")',node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;position:relative;top:2px;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(i3GEO.arvoreDeCamadas.FUNCOES.fonte===true&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){html+=" <img class='ajuda_usuario' style='top:-2px;' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+tema.name+"\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(tema.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
| 2 | 1 | \ No newline at end of file |
| 2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",FINALIZA:"",finaliza:"",ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},CAMADAS:"",CAMADASINICIAIS:"",SID:null,LOCAPLIC:null,cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=((i3GEO.parametros.w/2)-75)+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("t1")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,idlegenda:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),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(this.REFRESH===true){ins+="<img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"}if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tnome!==""){new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:true,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:true,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;ltema=i3GEO.pluginI3geo.aplicaPropriedades(ltema);funcoes=i3GEO.util.cloneObj(funcoes);funcoes.plugini3geo=ltema.plugini3geo;funcoes=i3GEO.pluginI3geo.aplicaPropriedades(funcoes);if(funcoes.opacidade===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+"<br>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+"<br>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+"<br>"+$inputText("","","nn"+ltema.name,"","15","")+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.copia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("x100"),$trad("x101"),'i3GEO.tema.copia(\"'+ltema.name+'\")',node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;position:relative;top:2px;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(i3GEO.arvoreDeCamadas.FUNCOES.fonte===true&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){html+=" <img class='ajuda_usuario' style='top:-2px;' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+tema.name+"\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(tema.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
| 3 | 3 | \ No newline at end of file | ... | ... |
classesjs/i3geo_tudo_compacto6.js
| ... | ... | @@ -395,7 +395,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3 |
| 395 | 395 | 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," ","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"))}}; |
| 396 | 396 | 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.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,funcaoAposRedim,dimensionavel,icone,funcaoDuplica){if(!dimensionavel){dimensionavel=true}if(!icone){icone=""}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' class='i3GeoAguardeJanela' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde2.gif\' />"}if(icone!=""){ins+="<img class='i3GeoIconeJanela' src='"+icone+"' >"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoDuplica){ins+="<div id='"+id+"_duplicaJanela' class='container-duplica'></div>"}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;width:100%"></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.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");if($i(id+"i")){$i(id+"i").style.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(funcaoDuplica){$i(id+'_duplicaJanela').onclick=funcaoDuplica}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.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> <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();if(janela.header){janela.header.style.height="20px"}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,f3,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(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();funcao1.call()}}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()}}f3=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()};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:$trad("x75"),handler:f3},{text:resposta1,handler:f1},{text:resposta2,handler:f2}],icon:YAHOO.widget.SimpleDialog.ICON_HELP,text:"<p class=paragrafo >"+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><div class='i3geoForm i3geoFormIconeEdita' ><input id='i3GEOjanelaprompt' type=text value='"+valorDefault+"' />";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,onButtonClick){var temp=$i(idDiv);if(temp&&!($i(idCombo))){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao;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> ")}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}if(!onButtonClick){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> ");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,botao)},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)}}}; |
| 397 | 397 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navm){ins="2px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(){var ims,n,i;ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",0.7);ims[i].style.boxShadow=""}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="";ims[0].style.margin="0px";ims[0].style.padding="0px";if(chro===true){ims[0].style.padding="1.7px"}ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",0.6);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; |
| 398 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",FINALIZA:"",finaliza:"",ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},CAMADAS:"",CAMADASINICIAIS:"",SID:null,LOCAPLIC:null,cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("t1")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,idlegenda:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),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(this.REFRESH===true){ins+="<img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"}if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tnome!==""){new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:true,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:true,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;ltema=i3GEO.pluginI3geo.aplicaPropriedades(ltema);funcoes=i3GEO.util.cloneObj(funcoes);funcoes.plugini3geo=ltema.plugini3geo;funcoes=i3GEO.pluginI3geo.aplicaPropriedades(funcoes);if(funcoes.opacidade===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+"<br>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+"<br>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+"<br>"+$inputText("","","nn"+ltema.name,"","15","")+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.copia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("x100"),$trad("x101"),'i3GEO.tema.copia(\"'+ltema.name+'\")',node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;position:relative;top:2px;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(i3GEO.arvoreDeCamadas.FUNCOES.fonte===true&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){html+=" <img class='ajuda_usuario' style='top:-2px;' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+tema.name+"\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(tema.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
| 398 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",FINALIZA:"",finaliza:"",ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},CAMADAS:"",CAMADASINICIAIS:"",SID:null,LOCAPLIC:null,cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=((i3GEO.parametros.w/2)-75)+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("t1")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,idlegenda:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),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(this.REFRESH===true){ins+="<img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"}if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tnome!==""){new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:true,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:true,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;ltema=i3GEO.pluginI3geo.aplicaPropriedades(ltema);funcoes=i3GEO.util.cloneObj(funcoes);funcoes.plugini3geo=ltema.plugini3geo;funcoes=i3GEO.pluginI3geo.aplicaPropriedades(funcoes);if(funcoes.opacidade===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+"<br>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+"<br>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+"<br>"+$inputText("","","nn"+ltema.name,"","15","")+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.copia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("x100"),$trad("x101"),'i3GEO.tema.copia(\"'+ltema.name+'\")',node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;position:relative;top:2px;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(i3GEO.arvoreDeCamadas.FUNCOES.fonte===true&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){html+=" <img class='ajuda_usuario' style='top:-2px;' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+tema.name+"\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(tema.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
| 399 | 399 | 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çã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")+" ","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","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},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' > </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","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}}}; |
| 400 | 400 | 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(i3GEO.Interface.ATUAL==="googlemaps"&&exy.target&&!exy.target.src){i3GEO.eventos.executaEventos(this.MOUSEUP)}if(i3GEO.Interface.ATUAL==="openlayers"&&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){return;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){if(!docMapa){return}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){}}}}; |
| 401 | 401 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDHTML:"arvoreAdicionaTema",ARVORE:null,FATORESTRELA:10,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:""},INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIREGIOES:true,INCLUIINDIBR:true,INCLUIWMSMETAESTAT:true,INCLUIMAPASCADASTRADOS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,LOCAPLIC:null,SID: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","","","","<span class='i3GEOconeFerramenta i3GEOiconeCatalogo'></span>"+$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ã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,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},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,hasIcon:true,className:"i3GeoFolder",enableHighlight:false,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,hasIcon:true,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,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},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,hasIcon:true,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,hasIcon:true},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,hasIcon:true},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='radio' /></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'> 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,hasIcon:true,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,hasIcon:true,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 mais="",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="<table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </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> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}tempNode=new YAHOO.widget.HTMLNode({html:"<b>"+$trad("g1a")+"</b>",idmenu:"",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+" <br>",isLeaf:true,enableHighlight:true,expanded:false,hasIcon:true},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,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a><br>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS===true||i3GEO.arvoreDeTemas.INCLUIESTRELAS===true||i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true||i3GEO.arvoreDeTemas.INCLUIWMS===true||i3GEO.arvoreDeTemas.INCLUIREGIOES===true||i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){mais=new YAHOO.widget.HTMLNode({html:$trad("mais"),enableHighlight:false,expanded:false,idmais:"idmais",className:"i3GeoFolder"},root);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;'>OGC-WMS</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIREGIOES===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x87")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>",idregioes:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaRegioes,1)}if(i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x57")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=112' > </a>",idwmsmetaestat:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaVariaveisMetaestat,1)}if(i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x90")+"</span>",idmapacadastrado:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMapasCadastrados,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<span style='position:relative;' >"+$trad("t46")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false,className:"i3GeoFolder"},mais);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)}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:$trad("a11")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},mais)}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)}}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")}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="<span style='position:relative;' title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<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,className:"i3GeoFolder"},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else if(mais!=""){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:""+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:true,expanded:false,className:"i3GeoFolder"},i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmais","idmais"));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,className:"i3GeoFolder"},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;'>"+grupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,className:"i3GeoFolder",idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,className:"i3GeoFolder",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;'>"+subgrupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,className:"i3GeoFolder",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,className:"i3GeoFolder"}}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,prefixo="",funcaoClick="i3GEO.util.adicionaSHP";dirs=retorno.data.diretorios;if(!node.data.retornaDir){node.data.retornaDir=false}for(ig=0;ig<dirs.length;ig+=1){if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if(node.data.retornaDir===true){prefixo="<input type=radio onclick='i3GEOF.navegarquivos.retorna(\""+node.data.caminho+"/"+dirs[ig]+"\")' />"}tempNode=new YAHOO.widget.HTMLNode({html:prefixo+dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false,listaImg:node.data.listaImg,listaFig:node.data.listaFig,listaShp:node.data.listaShp,retornaDir:node.data.retornaDir,funcaoClick:funcaoClick,className:"i3GeoFolder"},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.verificaStatusTema(this,\""+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)},verificaStatusTema:function(obj,tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){if(i3GEO.arvoreDeCamadas.ARVORE){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,obj.checked)}else{var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.janela.fechaAguarde("redesenha")};if(!obj.checked){i3GEO.php.ligatemas(temp,tid,"")}else{i3GEO.php.ligatemas(temp,"",tid)}}}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},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.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(valor){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)},buscaCheckbox:function(valor){var o,inputs,n,i;if(i3GEO.arvoreDeTemas.ARVORE){o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);if(o){inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{if(inputs[i].value===valor){return inputs[i]}i+=1}while(i<n)}}return false},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'> 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'> 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(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadarquivos/dependencias.php","i3GEOF.uploadarquivos.iniciaJanelaFlutuante()","i3GEOF.uploadarquivos_script")},conectaservico:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectarservicos/dependencias.php","i3GEOF.conectarservicos.iniciaJanelaFlutuante()","i3GEOF.conectarservicos_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/dependencias.php","i3GEOF.buscainde.iniciaJanelaFlutuante()","i3GEOF.buscainde_script")},vinde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/dependencias.php","i3GEOF.vinde.iniciaJanelaFlutuante()","i3GEOF.vinde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/dependencias.php","i3GEOF.nuvemtags.iniciaJanelaFlutuante()","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/dependencias.php","i3GEOF.importarwmc.iniciaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},},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)}}; | ... | ... |
classesjs/i3geo_tudo_compacto6.js.php
| ... | ... | @@ -395,7 +395,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3 |
| 395 | 395 | 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," ","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"))}}; |
| 396 | 396 | 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.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,funcaoAposRedim,dimensionavel,icone,funcaoDuplica){if(!dimensionavel){dimensionavel=true}if(!icone){icone=""}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' class='i3GeoAguardeJanela' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde2.gif\' />"}if(icone!=""){ins+="<img class='i3GeoIconeJanela' src='"+icone+"' >"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoDuplica){ins+="<div id='"+id+"_duplicaJanela' class='container-duplica'></div>"}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;width:100%"></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.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");if($i(id+"i")){$i(id+"i").style.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(funcaoDuplica){$i(id+'_duplicaJanela').onclick=funcaoDuplica}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.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> <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();if(janela.header){janela.header.style.height="20px"}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,f3,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(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();funcao1.call()}}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()}}f3=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()};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:$trad("x75"),handler:f3},{text:resposta1,handler:f1},{text:resposta2,handler:f2}],icon:YAHOO.widget.SimpleDialog.ICON_HELP,text:"<p class=paragrafo >"+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><div class='i3geoForm i3geoFormIconeEdita' ><input id='i3GEOjanelaprompt' type=text value='"+valorDefault+"' />";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,onButtonClick){var temp=$i(idDiv);if(temp&&!($i(idCombo))){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao;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> ")}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}if(!onButtonClick){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> ");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,botao)},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)}}}; |
| 397 | 397 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navm){ins="2px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(){var ims,n,i;ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",0.7);ims[i].style.boxShadow=""}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="";ims[0].style.margin="0px";ims[0].style.padding="0px";if(chro===true){ims[0].style.padding="1.7px"}ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",0.6);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; |
| 398 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",FINALIZA:"",finaliza:"",ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},CAMADAS:"",CAMADASINICIAIS:"",SID:null,LOCAPLIC:null,cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("t1")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,idlegenda:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),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(this.REFRESH===true){ins+="<img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"}if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tnome!==""){new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:true,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:true,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;ltema=i3GEO.pluginI3geo.aplicaPropriedades(ltema);funcoes=i3GEO.util.cloneObj(funcoes);funcoes.plugini3geo=ltema.plugini3geo;funcoes=i3GEO.pluginI3geo.aplicaPropriedades(funcoes);if(funcoes.opacidade===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+"<br>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+"<br>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+"<br>"+$inputText("","","nn"+ltema.name,"","15","")+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.copia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("x100"),$trad("x101"),'i3GEO.tema.copia(\"'+ltema.name+'\")',node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;position:relative;top:2px;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(i3GEO.arvoreDeCamadas.FUNCOES.fonte===true&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){html+=" <img class='ajuda_usuario' style='top:-2px;' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+tema.name+"\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(tema.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
| 398 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",FINALIZA:"",finaliza:"",ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},CAMADAS:"",CAMADASINICIAIS:"",SID:null,LOCAPLIC:null,cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=((i3GEO.parametros.w/2)-75)+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("t1")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,idlegenda:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),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(this.REFRESH===true){ins+="<img "+estilo("i3geo_refresh2")+" onclick='i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)' title='Refresh' id='i3geo_refresh'/>"}if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tnome!==""){new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:true,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:true,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;ltema=i3GEO.pluginI3geo.aplicaPropriedades(ltema);funcoes=i3GEO.util.cloneObj(funcoes);funcoes.plugini3geo=ltema.plugini3geo;funcoes=i3GEO.pluginI3geo.aplicaPropriedades(funcoes);if(funcoes.opacidade===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+"<br>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+"<br>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+"<br>"+$inputText("","","nn"+ltema.name,"","15","")+"<img class='tic' style='position:relative;top:1px;left:2px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />";new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.copia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("x100"),$trad("x101"),'i3GEO.tema.copia(\"'+ltema.name+'\")',node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;position:relative;top:2px;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(i3GEO.arvoreDeCamadas.FUNCOES.fonte===true&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){html+=" <img class='ajuda_usuario' style='top:-2px;' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+tema.name+"\",true)' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(tema.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
| 399 | 399 | 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çã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")+" ","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","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},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' > </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","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}}}; |
| 400 | 400 | 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(i3GEO.Interface.ATUAL==="googlemaps"&&exy.target&&!exy.target.src){i3GEO.eventos.executaEventos(this.MOUSEUP)}if(i3GEO.Interface.ATUAL==="openlayers"&&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){return;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){if(!docMapa){return}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){}}}}; |
| 401 | 401 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDHTML:"arvoreAdicionaTema",ARVORE:null,FATORESTRELA:10,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:""},INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIREGIOES:true,INCLUIINDIBR:true,INCLUIWMSMETAESTAT:true,INCLUIMAPASCADASTRADOS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,LOCAPLIC:null,SID: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","","","","<span class='i3GEOconeFerramenta i3GEOiconeCatalogo'></span>"+$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ã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,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},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,hasIcon:true,className:"i3GeoFolder",enableHighlight:false,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,hasIcon:true,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,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},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,hasIcon:true,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,hasIcon:true},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,hasIcon:true},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='radio' /></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'> 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,hasIcon:true,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,hasIcon:true,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 mais="",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="<table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </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> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}tempNode=new YAHOO.widget.HTMLNode({html:"<b>"+$trad("g1a")+"</b>",idmenu:"",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+" <br>",isLeaf:true,enableHighlight:true,expanded:false,hasIcon:true},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,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a><br>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS===true||i3GEO.arvoreDeTemas.INCLUIESTRELAS===true||i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true||i3GEO.arvoreDeTemas.INCLUIWMS===true||i3GEO.arvoreDeTemas.INCLUIREGIOES===true||i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){mais=new YAHOO.widget.HTMLNode({html:$trad("mais"),enableHighlight:false,expanded:false,idmais:"idmais",className:"i3GeoFolder"},root);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;'>OGC-WMS</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIREGIOES===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x87")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>",idregioes:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaRegioes,1)}if(i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x57")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=112' > </a>",idwmsmetaestat:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaVariaveisMetaestat,1)}if(i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x90")+"</span>",idmapacadastrado:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMapasCadastrados,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<span style='position:relative;' >"+$trad("t46")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false,className:"i3GeoFolder"},mais);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)}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:$trad("a11")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},mais)}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)}}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")}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="<span style='position:relative;' title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<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,className:"i3GeoFolder"},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else if(mais!=""){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:""+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:true,expanded:false,className:"i3GeoFolder"},i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmais","idmais"));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,className:"i3GeoFolder"},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;'>"+grupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,className:"i3GeoFolder",idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,className:"i3GeoFolder",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;'>"+subgrupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,className:"i3GeoFolder",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,className:"i3GeoFolder"}}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,prefixo="",funcaoClick="i3GEO.util.adicionaSHP";dirs=retorno.data.diretorios;if(!node.data.retornaDir){node.data.retornaDir=false}for(ig=0;ig<dirs.length;ig+=1){if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if(node.data.retornaDir===true){prefixo="<input type=radio onclick='i3GEOF.navegarquivos.retorna(\""+node.data.caminho+"/"+dirs[ig]+"\")' />"}tempNode=new YAHOO.widget.HTMLNode({html:prefixo+dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false,listaImg:node.data.listaImg,listaFig:node.data.listaFig,listaShp:node.data.listaShp,retornaDir:node.data.retornaDir,funcaoClick:funcaoClick,className:"i3GeoFolder"},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.verificaStatusTema(this,\""+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)},verificaStatusTema:function(obj,tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){if(i3GEO.arvoreDeCamadas.ARVORE){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,obj.checked)}else{var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.janela.fechaAguarde("redesenha")};if(!obj.checked){i3GEO.php.ligatemas(temp,tid,"")}else{i3GEO.php.ligatemas(temp,"",tid)}}}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},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.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(valor){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)},buscaCheckbox:function(valor){var o,inputs,n,i;if(i3GEO.arvoreDeTemas.ARVORE){o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);if(o){inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{if(inputs[i].value===valor){return inputs[i]}i+=1}while(i<n)}}return false},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'> 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'> 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(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadarquivos/dependencias.php","i3GEOF.uploadarquivos.iniciaJanelaFlutuante()","i3GEOF.uploadarquivos_script")},conectaservico:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectarservicos/dependencias.php","i3GEOF.conectarservicos.iniciaJanelaFlutuante()","i3GEOF.conectarservicos_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/dependencias.php","i3GEOF.buscainde.iniciaJanelaFlutuante()","i3GEOF.buscainde_script")},vinde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/dependencias.php","i3GEOF.vinde.iniciaJanelaFlutuante()","i3GEOF.vinde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/dependencias.php","i3GEOF.nuvemtags.iniciaJanelaFlutuante()","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/dependencias.php","i3GEOF.importarwmc.iniciaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},},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)}}; | ... | ... |
classesphp/classe_temas.php
| ... | ... | @@ -127,7 +127,7 @@ $ext - (opcional) extens&atilde;o geogr&aacute;fica que ser&aacute; aplicada ao |
| 127 | 127 | $this->v = versao(); |
| 128 | 128 | $this->vi = $this->v["inteiro"]; |
| 129 | 129 | $this->v = $this->v["principal"]; |
| 130 | - | |
| 130 | + | |
| 131 | 131 | $this->locaplic = $locaplic; |
| 132 | 132 | if($map_file != "") |
| 133 | 133 | { |
| ... | ... | @@ -429,8 +429,7 @@ Calcula a extens&atilde;o geogr&aacute;fica de um tema e ajusta o mapa para essa |
| 429 | 429 | } |
| 430 | 430 | $prjMapa = ""; |
| 431 | 431 | $prjTema = ""; |
| 432 | - if($this->layer->type != MS_LAYER_RASTER) | |
| 433 | - { | |
| 432 | + if($this->layer->type != MS_LAYER_RASTER){ | |
| 434 | 433 | $prjMapa = $this->mapa->getProjection(); |
| 435 | 434 | $prjTema = $this->layer->getProjection(); |
| 436 | 435 | } |
| ... | ... | @@ -440,10 +439,10 @@ Calcula a extens&atilde;o geogr&aacute;fica de um tema e ajusta o mapa para essa |
| 440 | 439 | //necessário para evitar que em qualquer redesenho do mapa, seja aplicado o zoom para o tema marcado com aplicaextensao |
| 441 | 440 | // |
| 442 | 441 | $this->layer->setmetadata("aplicaextensao",""); |
| 443 | - if($ret == "" && $this->layer->type == MS_LAYER_RASTER) | |
| 444 | - {$ret = "-75.233614607 -33.7515829981 -27.592958622 5.272156";} | |
| 445 | - if ($ret == "") | |
| 446 | - { | |
| 442 | + if($ret == "" && $this->layer->type == MS_LAYER_RASTER){ | |
| 443 | + $ret = "-75.233614607 -33.7515829981 -27.592958622 5.272156"; | |
| 444 | + } | |
| 445 | + if ($ret == ""){ | |
| 447 | 446 | $ret = $this->layer->getextent(); |
| 448 | 447 | //reprojeta o retangulo |
| 449 | 448 | if (($prjTema != "") && ($prjMapa != $prjTema)) |
| ... | ... | @@ -454,14 +453,14 @@ Calcula a extens&atilde;o geogr&aacute;fica de um tema e ajusta o mapa para essa |
| 454 | 453 | } |
| 455 | 454 | $extatual->setextent($ret->minx,$ret->miny,$ret->maxx,$ret->maxy); |
| 456 | 455 | } |
| 457 | - else | |
| 458 | - { | |
| 456 | + else{ | |
| 459 | 457 | $ret = explode(" ",$ret); |
| 460 | 458 | $extatual->setextent($ret[0],$ret[1],$ret[2],$ret[3]); |
| 461 | 459 | //echo "oi";exit; |
| 462 | 460 | } |
| 463 | - if($this->mapa->getmetadata("interface") == "googlemaps") | |
| 464 | - {$this->mapa->setProjection($projO);} | |
| 461 | + if($this->mapa->getmetadata("interface") == "googlemaps"){ | |
| 462 | + $this->mapa->setProjection($projO); | |
| 463 | + } | |
| 465 | 464 | return("ok"); |
| 466 | 465 | } |
| 467 | 466 | /* | ... | ... |