From 6ad474da53710ff98c2d149c16a530e6fdfa5172 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 27 Oct 2009 15:31:30 +0000 Subject: [PATCH] #183 --- classesjs/classe_arvoredetemas.js | 8 ++++++-- classesjs/compactados/classe_arvoredetemas_compacto.js | 2 +- classesjs/i3geo_tudo_compacto.js | 2 +- classesjs/i3geo_tudo_compacto.js.php | 2 +- ferramentas/upload/index.js.php | 16 ---------------- ferramentas/uploaddbf/index.js | 65 ----------------------------------------------------------------- ferramentas/uploaddbf/index.js.php | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ferramentas/uploaddbf/upload.php | 67 +++++++++++++++++++++++++++---------------------------------------- 8 files changed, 222 insertions(+), 126 deletions(-) delete mode 100644 ferramentas/uploaddbf/index.js create mode 100644 ferramentas/uploaddbf/index.js.php diff --git a/classesjs/classe_arvoredetemas.js b/classesjs/classe_arvoredetemas.js index 09a3851..e5aff87 100644 --- a/classesjs/classe_arvoredetemas.js +++ b/classesjs/classe_arvoredetemas.js @@ -1641,8 +1641,12 @@ i3GEO.arvoreDeTemas = { Abre a janela para o upload de um arquivo dbf */ - uploaddbf: function() - {i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.htm","","","Upload DBF    ");}, + uploaddbf: function(){ + if(typeof(i3GEOF.uploaddbf) === 'undefined'){ + var js = i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js.php"; + i3GEO.util.scriptTag(js,"i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script"); + } + }, /* Function: downloadbase diff --git a/classesjs/compactados/classe_arvoredetemas_compacto.js b/classesjs/compactados/classe_arvoredetemas_compacto.js index f326ade..721c2fe 100644 --- a/classesjs/compactados/classe_arvoredetemas_compacto.js +++ b/classesjs/compactados/classe_arvoredetemas_compacto.js @@ -1 +1 @@ -if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,nuvemTags:true,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true},FATORESTRELA:"1",INCLUISISTEMAS:true,INCLUIWMS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",IDHTML:null,LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,cor,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;cor="rgb(51, 102, 102)";for(i=0;i "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)"}else{html+=" (% de acessos não definido)"}html+="
";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1);tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:retorno.data[i].nome},node,false,true);tempNode.enableHighlight=false;if(!retorno.data[i].estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(retorno.data[i].estilos){ns=retorno.data[i].estilos.length;for(j=0;j";html+=layer+" - "+titulo;html+="";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
";insp+="";insp+="";insp+="";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp},root,false,false);tempNode.enableHighlight=false}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+" 
"},root,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    "},root,false,true);tempNode.enableHighlight=false;drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho},tempNode,false,true);drive.enableHighlight=false;drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig++}while(igSistema de administração",idmenu:""},root,false,true);tempNode.enableHighlight=false;tempNode=new YAHOO.widget.HTMLNode({html:"Editor de menus",idmenu:""},root,false,true);tempNode.enableHighlight=false}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    ",idwms:"raiz"},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i "+dados[i].nomemenu+""}else{conteudo=" "+dados[i].nomemenu+""}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status=="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"Sistemas"+"    "},root,false,true);tempNode.enableHighlight=false}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO=="NAO"||sis[ig].PUBLICADO=="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis},tempNode,false,true);sisNode.enableHighlight=false;funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc},sisNode,false,true);funcNode.enableHighlight=false;funcNode.isLeaf=true}ig++}while(ig"+grupos[i].nome+""}}d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;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,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i"+subgrupos[i].nome+""}}d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}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"+temas[i].nome+""}}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},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="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,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo=""+conteudo+"";nodeSHP=new YAHOO.widget.HTMLNode({html:conteudo,caminho:node.data.caminho+"/"+conteudo},node,false,true);nodeSHP.enableHighlight=false;nodeSHP.isLeaf=true}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html="";html+=tema.nome;html+="";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte!==""&&node.data.fonte!=" "){tempNode=new YAHOO.widget.HTMLNode({html:"Fonte"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}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";tempNode=new YAHOO.widget.HTMLNode({html:"Miniatura"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(node.data.ogc!="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz=="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({html:"WMS - OGC"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({html:"Qrcode"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}if(n>0){html=""}else{html=""}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i++}while(i=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg fonte"}d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+"";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta++}}}while(ig--)}else{d="Nada encontrado

";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas(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()},adicionaTemas:function(){var tsl,temp;clearTimeout(tempoBotaoAplicar);tempoBotaoAplicar="";i3GEO.temaAtivo="";tsl=i3GEO.arvoreDeTemas.listaTemasAtivos();i3GEO.arvoreDeTemas.desativaCheckbox();if(tsl.length>0){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");if(retorno.data.erro){alert(retorno.data.erro);return}i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!=i3GEO.guias.ATUAL){i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins=""};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var obGrupos,ins,ig;obGrupos=retorno.data;ins=""};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=""};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu){var combo=function(retorno){var ins,sg,ig;ins=""};i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)},dialogo:{nuvemTags:function(){i3GEO.janela.cria("350px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.htm","","","Nuvem de tags    ")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS    ")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T    ")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS    ")},upload:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")}},uploaddbf:function(){i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.htm","","","Upload DBF    ")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; \ No newline at end of file +if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,nuvemTags:true,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true},FATORESTRELA:"1",INCLUISISTEMAS:true,INCLUIWMS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",IDHTML:null,LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,cor,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;cor="rgb(51, 102, 102)";for(i=0;i "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)"}else{html+=" (% de acessos não definido)"}html+="
";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1);tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:retorno.data[i].nome},node,false,true);tempNode.enableHighlight=false;if(!retorno.data[i].estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(retorno.data[i].estilos){ns=retorno.data[i].estilos.length;for(j=0;j";html+=layer+" - "+titulo;html+="";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
";insp+="";insp+="";insp+="";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp},root,false,false);tempNode.enableHighlight=false}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+" 
"},root,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    "},root,false,true);tempNode.enableHighlight=false;drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho},tempNode,false,true);drive.enableHighlight=false;drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig++}while(igSistema de administração",idmenu:""},root,false,true);tempNode.enableHighlight=false;tempNode=new YAHOO.widget.HTMLNode({html:"Editor de menus",idmenu:""},root,false,true);tempNode.enableHighlight=false}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    ",idwms:"raiz"},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i "+dados[i].nomemenu+""}else{conteudo=" "+dados[i].nomemenu+""}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status=="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"Sistemas"+"    "},root,false,true);tempNode.enableHighlight=false}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO=="NAO"||sis[ig].PUBLICADO=="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis},tempNode,false,true);sisNode.enableHighlight=false;funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc},sisNode,false,true);funcNode.enableHighlight=false;funcNode.isLeaf=true}ig++}while(ig"+grupos[i].nome+""}}d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;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,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i"+subgrupos[i].nome+""}}d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}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"+temas[i].nome+""}}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},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="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,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo=""+conteudo+"";nodeSHP=new YAHOO.widget.HTMLNode({html:conteudo,caminho:node.data.caminho+"/"+conteudo},node,false,true);nodeSHP.enableHighlight=false;nodeSHP.isLeaf=true}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html="";html+=tema.nome;html+="";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte!==""&&node.data.fonte!=" "){tempNode=new YAHOO.widget.HTMLNode({html:"Fonte"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}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";tempNode=new YAHOO.widget.HTMLNode({html:"Miniatura"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(node.data.ogc!="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz=="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({html:"WMS - OGC"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({html:"Qrcode"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}if(n>0){html=""}else{html=""}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i++}while(i=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg fonte"}d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+"";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta++}}}while(ig--)}else{d="Nada encontrado

";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas(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()},adicionaTemas:function(){var tsl,temp;clearTimeout(tempoBotaoAplicar);tempoBotaoAplicar="";i3GEO.temaAtivo="";tsl=i3GEO.arvoreDeTemas.listaTemasAtivos();i3GEO.arvoreDeTemas.desativaCheckbox();if(tsl.length>0){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");if(retorno.data.erro){alert(retorno.data.erro);return}i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!=i3GEO.guias.ATUAL){i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins=""};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var obGrupos,ins,ig;obGrupos=retorno.data;ins=""};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=""};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu){var combo=function(retorno){var ins,sg,ig;ins=""};i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)},dialogo:{nuvemTags:function(){i3GEO.janela.cria("350px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.htm","","","Nuvem de tags    ")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS    ")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T    ")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS    ")},upload:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")}},uploaddbf:function(){if(typeof(i3GEOF.uploaddbf)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")}},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; \ No newline at end of file diff --git a/classesjs/i3geo_tudo_compacto.js b/classesjs/i3geo_tudo_compacto.js index a8423e0..3716a08 100644 --- a/classesjs/i3geo_tudo_compacto.js +++ b/classesjs/i3geo_tudo_compacto.js @@ -151,7 +151,7 @@ if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={ARRASTARORDEM:tru if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,zoomin:function(locaplic,sid){if(arguments.length===2){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(arguments.length===2){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+");";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.janela.abreAguarde('i3GEO.atualiza',$trad('o1'));i3GEO.contadorAtualiza++;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{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"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==="padrao"){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"i3GEO.php.mudaescala(i3GEO.atualiza,"+escala+");";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}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,y,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}if(direcao==="norte"){y=h/6;x=w/2}if(direcao==="sul"){y=h-(h/6);x=w/2}if(direcao==="leste"){x=w-(w/6);y=h/2}if(direcao==="oeste"){x=w/6;y=h/2}if(direcao==="nordeste"){y=h/6;x=w-(w/6)}if(direcao==="sudeste"){y=h-(h/6);x=w-(w/6)}if(direcao==="noroeste"){y=h/6;x=w/6}if(direcao==="sudoeste"){y=h-(h/6);x=w/6}f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"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="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="
x
";setas+="
";setas+="";setas+="
";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27;i.style.left=objposicaocursor.telax-27;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);i3GEO.contadorAtualiza++;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:{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;i.height=0;i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+g_postpx;i.top=objposicaocursor.telay+g_postpx;boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;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,temp;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}if(hb>2){b.height=hb-2}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel);if(i3GEO.Interface.ATUAL==="padrao"){$i("img").title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxZoom",i3GEO.configura.locaplic);temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}}},desloca:function(){var bxs,ppx,py;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}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2}if(ppxboxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx";$i("div_d").style.left=parseInt($i("corpoMapa").style.left,10);$i("div_d").style.top=parseInt($i("corpoMapa").style.top,10);$i("img_d").style.left=0;$i("img_d").style.top=0;$i("img_d").style.width=i3GEO.parametros.w;$i("img_d").style.height=i3GEO.parametros.h;$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="

+-

"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(150,0,"","center","center","Parar destaque  ","ativadesativaDestaque");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.janela.abreAguarde("ajaxdestaca","Aguarde...gerando imagem");i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA)},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)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='
'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='
';temp+='
';if(navm){temp+='
'}else{temp+='
'}if(navn){temp+='
'}return temp},ativa:function(){$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';if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout("g_fatordezoom = 0;$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR)};$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';if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.timerNavega)}i3GEO.navega.timerNavega=setTimeout("g_fatordezoom = 0;$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR)};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(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);g_fatordezoom=0;verticalSlider.setValue(35,true)}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;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;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=corpo.style.top;iclone.style.left=corpo.style.left;$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){var iclone,corpo,nt,nl,velhoh,velhow,nh,nw,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;iclone.style.height=nh;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}}}}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.selecao={porxy:function(tema,tipo,tolerancia){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.selecaopt(retorna,tema,objposicaocursor.ddx+" "+objposicaocursor.ddy,tipo,tolerancia)},porbox:function(tema,tipo,box){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.selecaobox(retorna,tema,tipo,box)},janelaOpcoes:function(){var janela,temp;g_tipoacao="selecao";i3GEO.temaAtivo="";janela=i3GEO.janela.cria("430px","320px",i3GEO.configura.locaplic+'/ferramentas/selecao/index.htm',"","","Seleção    ");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.selecao.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.clique()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.selecao.atualizaGrafico()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.selecao.atualizaGrafico()")}temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.selecao.clique()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.selecao.atualizaGrafico()");try{i3GEO.desenho.richdraw.fecha()}catch(e){}if($i("pontosins")){document.body.removeChild($i("pontosins"))}i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)},atualizaGrafico:function(){if(g_tipoacao==="selecao"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(doc.getElementById("guia5obj")){if(doc.getElementById("guia5obj").style.display==="block"){if(window.parent.frames.wdocai.atualizaGrafico){window.parent.frames.wdocai.atualizaGrafico()}}}}},clique:function(){if(g_tipoacao==="selecao"){var doc,tipo,tolerancia;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;tipo="adiciona";if(doc.getElementById("tipoOperacao")){tipo=doc.getElementById("tipoOperacao").value}if(i3GEO.temaAtivo===""){alert("Nenhum tema ativo");return}tolerancia=doc.getElementById("toleranciapt").value;if((tipo!=="limpa")&&(tipo!=="inverte")){i3GEO.selecao.porxy(i3GEO.temaAtivo,tipo,tolerancia)}}},box:{inicia:function(){if(g_tipoacao!=='selecaobox'){return}i3GEO.selecao.box.criaBox();adicionaxyBox=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));var i=$i("i3geoboxSel").style;i.width=0;i.height=0;i.visibility="visible";i.display="block";i.left=objposicaocursor.imgx+adicionaxyBox[0]+g_postpx;i.top=objposicaocursor.imgy+adicionaxyBox[1]+g_postpx;boxxini=objposicaocursor.imgx+adicionaxyBox[0];boxyini=objposicaocursor.imgy+adicionaxyBox[1];tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.selecao.box.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.selecao.box.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.selecao.box.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.selecao.box.termina()")}},criaBox:function(){try{i3GEO.desenho.richdraw.fecha()}catch(e){}i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="red";i3GEO.desenho.richdraw.lineWidth="2px";var novoel,temp;if(!$i("i3geoboxSel")){novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxSel";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="yellow";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("i3geoboxSel").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2}if(hb>2){b.height=hb-2}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.selecao.box.termina()};document.body.appendChild(novoel)}i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxSel",i3GEO.configura.locaplic);if($i("img")){$i("img").title="";temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}},desloca:function(){if(g_tipoacao!=='selecaobox'){return}var bxs,ppx,py;bxs=$i("i3geoboxSel").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.imgx+adicionaxyBox[0];py=objposicaocursor.imgy+adicionaxyBox[1];if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2}if(ppxboxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhas[n-1],n)}}},clique:function(){if(g_tipoacao!=="selecaopoli"){return}var n,d;n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}else{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}catch(e){window.status=n+" erro ao desenhar a linha base "+e.message}if(n>0){d=parseInt(i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy),10);pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1]}i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.selecao.poligono.termina,"divGeometriasTemp")},termina:function(){var doc,pontos,n,xs,ys,retorna,p,cp;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;pontos=pontosdistobj;i3GEO.desenho.richdraw.fecha();n=pontos.xpt.length;i3GEO.temaAtivo=doc.getElementById("comboTemas").value;xs=pontos.xpt.toString(",");ys=pontos.ypt.toString(",");retorna=function(){i3GEO.janela.fechaAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.atualiza("")};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoPoli";cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"selecaoPoli",retorna,xs,ys,doc.getElementById("comboTemas").value,doc.getElementById("tipoOperacao").value)}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){i3GEO.eventos.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(i3GEO.eventos.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUE)},executaEventos:function(eventos){try{var f,temp;if(eventos.length>0){f=eventos.length-1;if(f>=0){do{eval(eventos[f])}while(f--)}}}catch(e){}},posicaoMouseMapa:function(e){var teladd,teladms,container,targ,pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;try{container=e.target.parentNode.id}catch(erro){}if(container!=="divGeometriasTemp"){if((i3GEO.Interface.ATUAL==="googlemaps")||(i3GEO.Interface.ATUAL==="openlayers")){return}}if(!e){e=window.event}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((i3GEO.configura.entorno==="sim")&&(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);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout('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()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k;if(navm){k=event.button}else{k=exy.button}if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){if(arguments.length===0){var ixg="ixg",ixm="ixm",ixs="ixs",iyg="iyg",iym="iym",iys="iys",x,y;if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}else{var doc=document;x,y}if(g_tipoacao!=="capturaponto"){return}else{try{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){}}}}; -if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,nuvemTags:true,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true},FATORESTRELA:"1",INCLUISISTEMAS:true,INCLUIWMS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",IDHTML:null,LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,cor,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;cor="rgb(51, 102, 102)";for(i=0;i "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)"}else{html+=" (% de acessos não definido)"}html+="
";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1);tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:retorno.data[i].nome},node,false,true);tempNode.enableHighlight=false;if(!retorno.data[i].estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(retorno.data[i].estilos){ns=retorno.data[i].estilos.length;for(j=0;j";html+=layer+" - "+titulo;html+="";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
";insp+="";insp+="";insp+="";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp},root,false,false);tempNode.enableHighlight=false}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+" 
"},root,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    "},root,false,true);tempNode.enableHighlight=false;drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho},tempNode,false,true);drive.enableHighlight=false;drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig++}while(igSistema de administração",idmenu:""},root,false,true);tempNode.enableHighlight=false;tempNode=new YAHOO.widget.HTMLNode({html:"Editor de menus",idmenu:""},root,false,true);tempNode.enableHighlight=false}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    ",idwms:"raiz"},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i "+dados[i].nomemenu+""}else{conteudo=" "+dados[i].nomemenu+""}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status=="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"Sistemas"+"    "},root,false,true);tempNode.enableHighlight=false}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO=="NAO"||sis[ig].PUBLICADO=="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis},tempNode,false,true);sisNode.enableHighlight=false;funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc},sisNode,false,true);funcNode.enableHighlight=false;funcNode.isLeaf=true}ig++}while(ig"+grupos[i].nome+""}}d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;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,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i"+subgrupos[i].nome+""}}d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}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"+temas[i].nome+""}}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},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="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,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo=""+conteudo+"";nodeSHP=new YAHOO.widget.HTMLNode({html:conteudo,caminho:node.data.caminho+"/"+conteudo},node,false,true);nodeSHP.enableHighlight=false;nodeSHP.isLeaf=true}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html="";html+=tema.nome;html+="";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte!==""&&node.data.fonte!=" "){tempNode=new YAHOO.widget.HTMLNode({html:"Fonte"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}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";tempNode=new YAHOO.widget.HTMLNode({html:"Miniatura"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(node.data.ogc!="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz=="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({html:"WMS - OGC"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({html:"Qrcode"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}if(n>0){html=""}else{html=""}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i++}while(i=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg fonte"}d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+"";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta++}}}while(ig--)}else{d="Nada encontrado

";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas(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()},adicionaTemas:function(){var tsl,temp;clearTimeout(tempoBotaoAplicar);tempoBotaoAplicar="";i3GEO.temaAtivo="";tsl=i3GEO.arvoreDeTemas.listaTemasAtivos();i3GEO.arvoreDeTemas.desativaCheckbox();if(tsl.length>0){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");if(retorno.data.erro){alert(retorno.data.erro);return}i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!=i3GEO.guias.ATUAL){i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins=""};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var obGrupos,ins,ig;obGrupos=retorno.data;ins=""};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=""};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu){var combo=function(retorno){var ins,sg,ig;ins=""};i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)},dialogo:{nuvemTags:function(){i3GEO.janela.cria("350px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.htm","","","Nuvem de tags    ")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS    ")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T    ")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS    ")},upload:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")}},uploaddbf:function(){i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.htm","","","Upload DBF    ")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; +if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,nuvemTags:true,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true},FATORESTRELA:"1",INCLUISISTEMAS:true,INCLUIWMS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",IDHTML:null,LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,cor,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;cor="rgb(51, 102, 102)";for(i=0;i "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)"}else{html+=" (% de acessos não definido)"}html+="
";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1);tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:retorno.data[i].nome},node,false,true);tempNode.enableHighlight=false;if(!retorno.data[i].estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(retorno.data[i].estilos){ns=retorno.data[i].estilos.length;for(j=0;j";html+=layer+" - "+titulo;html+="";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
";insp+="";insp+="";insp+="";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp},root,false,false);tempNode.enableHighlight=false}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+" 
"},root,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    "},root,false,true);tempNode.enableHighlight=false;drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho},tempNode,false,true);drive.enableHighlight=false;drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig++}while(igSistema de administração",idmenu:""},root,false,true);tempNode.enableHighlight=false;tempNode=new YAHOO.widget.HTMLNode({html:"Editor de menus",idmenu:""},root,false,true);tempNode.enableHighlight=false}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    ",idwms:"raiz"},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i "+dados[i].nomemenu+""}else{conteudo=" "+dados[i].nomemenu+""}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status=="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"Sistemas"+"    "},root,false,true);tempNode.enableHighlight=false}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO=="NAO"||sis[ig].PUBLICADO=="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis},tempNode,false,true);sisNode.enableHighlight=false;funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc},sisNode,false,true);funcNode.enableHighlight=false;funcNode.isLeaf=true}ig++}while(ig"+grupos[i].nome+""}}d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;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,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i"+subgrupos[i].nome+""}}d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}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"+temas[i].nome+""}}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},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="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,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo=""+conteudo+"";nodeSHP=new YAHOO.widget.HTMLNode({html:conteudo,caminho:node.data.caminho+"/"+conteudo},node,false,true);nodeSHP.enableHighlight=false;nodeSHP.isLeaf=true}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html="";html+=tema.nome;html+="";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte!==""&&node.data.fonte!=" "){tempNode=new YAHOO.widget.HTMLNode({html:"Fonte"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}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";tempNode=new YAHOO.widget.HTMLNode({html:"Miniatura"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(node.data.ogc!="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz=="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({html:"WMS - OGC"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({html:"Qrcode"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}if(n>0){html=""}else{html=""}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i++}while(i=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg fonte"}d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+"";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta++}}}while(ig--)}else{d="Nada encontrado

";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas(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()},adicionaTemas:function(){var tsl,temp;clearTimeout(tempoBotaoAplicar);tempoBotaoAplicar="";i3GEO.temaAtivo="";tsl=i3GEO.arvoreDeTemas.listaTemasAtivos();i3GEO.arvoreDeTemas.desativaCheckbox();if(tsl.length>0){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");if(retorno.data.erro){alert(retorno.data.erro);return}i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!=i3GEO.guias.ATUAL){i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins=""};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var obGrupos,ins,ig;obGrupos=retorno.data;ins=""};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=""};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu){var combo=function(retorno){var ins,sg,ig;ins=""};i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)},dialogo:{nuvemTags:function(){i3GEO.janela.cria("350px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.htm","","","Nuvem de tags    ")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS    ")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T    ")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS    ")},upload:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")}},uploaddbf:function(){if(typeof(i3GEOF.uploaddbf)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")}},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaIcone:function(icone){var estilo,temp,ist,cor,ko;i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO=="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="laranja"||i3GEO.barraDeBotoes.COMPORTAMENTO=="vermelho"||i3GEO.barraDeBotoes.COMPORTAMENTO=="cinza"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="laranja"){cor="orange"}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="vermelho"){cor="red"}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="cinza"){cor="gray"}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b;if(arguments.length===0){padrao=i3GEO.barraDeBotoes.BOTAOPADRAO}i3GEO.barraDeBotoes.BOTAOCLICADO=padrao;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{if($i(l[b].iddiv)){if(l[b].conteudo){eval('$i(l[b].iddiv).innerHTML = "'+l[b].conteudo+'"')}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.ajuda.mostraJanela("'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.ajuda.mostraJanela("");};')}if(l[b].funcaoonclick){$i(l[b].iddiv).onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y){var tipo,mostra,numerobotoes,i,temp,elementos,nelementos,e,wj,recuo,novoel,alturadisponivel;wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(i3GEO.barraDeBotoes.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.OPACIDADE/100}}else{if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=0.85}}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){if($i("i3geo_rosa")){$i("i3geo_rosa").style.display="none"}if(i3GEO.barraDeBotoes.OPACIDADE){if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=0.85}}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.OPACIDADE/100}}};document.body.appendChild(novoel);if(i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";if(i3GEO.barraDeBotoes.AUTOALTURA){elementos=$i(idconteudonovo+"_").getElementsByTagName("img");if(elementos[0].id=="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");alturadisponivel=i3GEO.parametros.h-4;numerobotoes=parseInt(alturadisponivel/30,10);nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display==tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display=="block")||(e.style.display=="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i=0);mostra.style.display=tipo}}}}i3GEO.barraDeBotoes.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO){i3GEO.barraDeBotoes.ativaMenuContexto(idconteudonovo)}if($i(idconteudonovo+"_h")){$i(idconteudonovo+"_h").className="hd2"}},ativaMenuContexto:function(idbarra){var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender,id;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" "},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){eval("var id = 'contexto_"+idbarra+"'");$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){var n,i;if(arguments.length==1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i0){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{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"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==="padrao"){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"i3GEO.php.mudaescala(i3GEO.atualiza,"+escala+");";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}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,y,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}if(direcao==="norte"){y=h/6;x=w/2}if(direcao==="sul"){y=h-(h/6);x=w/2}if(direcao==="leste"){x=w-(w/6);y=h/2}if(direcao==="oeste"){x=w/6;y=h/2}if(direcao==="nordeste"){y=h/6;x=w-(w/6)}if(direcao==="sudeste"){y=h-(h/6);x=w-(w/6)}if(direcao==="noroeste"){y=h/6;x=w/6}if(direcao==="sudoeste"){y=h-(h/6);x=w/6}f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"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="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="";setas+="
x
";setas+="
";setas+="";setas+="
";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27;i.style.left=objposicaocursor.telax-27;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);i3GEO.contadorAtualiza++;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:{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;i.height=0;i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+g_postpx;i.top=objposicaocursor.telay+g_postpx;boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;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,temp;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}if(hb>2){b.height=hb-2}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel);if(i3GEO.Interface.ATUAL==="padrao"){$i("img").title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxZoom",i3GEO.configura.locaplic);temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}}},desloca:function(){var bxs,ppx,py;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}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2}if(ppxboxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx";$i("div_d").style.left=parseInt($i("corpoMapa").style.left,10);$i("div_d").style.top=parseInt($i("corpoMapa").style.top,10);$i("img_d").style.left=0;$i("img_d").style.top=0;$i("img_d").style.width=i3GEO.parametros.w;$i("img_d").style.height=i3GEO.parametros.h;$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="

+-

"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(150,0,"","center","center","Parar destaque  ","ativadesativaDestaque");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.janela.abreAguarde("ajaxdestaca","Aguarde...gerando imagem");i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA)},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)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='
'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='
';temp+='
';if(navm){temp+='
'}else{temp+='
'}if(navn){temp+='
'}return temp},ativa:function(){$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';if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout("g_fatordezoom = 0;$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR)};$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';if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.timerNavega)}i3GEO.navega.timerNavega=setTimeout("g_fatordezoom = 0;$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR)};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(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);g_fatordezoom=0;verticalSlider.setValue(35,true)}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;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;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=corpo.style.top;iclone.style.left=corpo.style.left;$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){var iclone,corpo,nt,nl,velhoh,velhow,nh,nw,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;iclone.style.height=nh;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}}}}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.selecao={porxy:function(tema,tipo,tolerancia){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.selecaopt(retorna,tema,objposicaocursor.ddx+" "+objposicaocursor.ddy,tipo,tolerancia)},porbox:function(tema,tipo,box){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.selecaobox(retorna,tema,tipo,box)},janelaOpcoes:function(){var janela,temp;g_tipoacao="selecao";i3GEO.temaAtivo="";janela=i3GEO.janela.cria("430px","320px",i3GEO.configura.locaplic+'/ferramentas/selecao/index.htm',"","","Seleção    ");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.selecao.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.clique()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.selecao.atualizaGrafico()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.selecao.atualizaGrafico()")}temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.selecao.clique()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.selecao.atualizaGrafico()");try{i3GEO.desenho.richdraw.fecha()}catch(e){}if($i("pontosins")){document.body.removeChild($i("pontosins"))}i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)},atualizaGrafico:function(){if(g_tipoacao==="selecao"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(doc.getElementById("guia5obj")){if(doc.getElementById("guia5obj").style.display==="block"){if(window.parent.frames.wdocai.atualizaGrafico){window.parent.frames.wdocai.atualizaGrafico()}}}}},clique:function(){if(g_tipoacao==="selecao"){var doc,tipo,tolerancia;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;tipo="adiciona";if(doc.getElementById("tipoOperacao")){tipo=doc.getElementById("tipoOperacao").value}if(i3GEO.temaAtivo===""){alert("Nenhum tema ativo");return}tolerancia=doc.getElementById("toleranciapt").value;if((tipo!=="limpa")&&(tipo!=="inverte")){i3GEO.selecao.porxy(i3GEO.temaAtivo,tipo,tolerancia)}}},box:{inicia:function(){if(g_tipoacao!=='selecaobox'){return}i3GEO.selecao.box.criaBox();adicionaxyBox=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));var i=$i("i3geoboxSel").style;i.width=0;i.height=0;i.visibility="visible";i.display="block";i.left=objposicaocursor.imgx+adicionaxyBox[0]+g_postpx;i.top=objposicaocursor.imgy+adicionaxyBox[1]+g_postpx;boxxini=objposicaocursor.imgx+adicionaxyBox[0];boxyini=objposicaocursor.imgy+adicionaxyBox[1];tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.selecao.box.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.selecao.box.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.selecao.box.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.selecao.box.termina()")}},criaBox:function(){try{i3GEO.desenho.richdraw.fecha()}catch(e){}i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="red";i3GEO.desenho.richdraw.lineWidth="2px";var novoel,temp;if(!$i("i3geoboxSel")){novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxSel";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="yellow";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("i3geoboxSel").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2}if(hb>2){b.height=hb-2}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.selecao.box.termina()};document.body.appendChild(novoel)}i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxSel",i3GEO.configura.locaplic);if($i("img")){$i("img").title="";temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}},desloca:function(){if(g_tipoacao!=='selecaobox'){return}var bxs,ppx,py;bxs=$i("i3geoboxSel").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.imgx+adicionaxyBox[0];py=objposicaocursor.imgy+adicionaxyBox[1];if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2}if(ppxboxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhas[n-1],n)}}},clique:function(){if(g_tipoacao!=="selecaopoli"){return}var n,d;n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}else{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}catch(e){window.status=n+" erro ao desenhar a linha base "+e.message}if(n>0){d=parseInt(i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy),10);pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1]}i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.selecao.poligono.termina,"divGeometriasTemp")},termina:function(){var doc,pontos,n,xs,ys,retorna,p,cp;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;pontos=pontosdistobj;i3GEO.desenho.richdraw.fecha();n=pontos.xpt.length;i3GEO.temaAtivo=doc.getElementById("comboTemas").value;xs=pontos.xpt.toString(",");ys=pontos.ypt.toString(",");retorna=function(){i3GEO.janela.fechaAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.atualiza("")};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoPoli";cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"selecaoPoli",retorna,xs,ys,doc.getElementById("comboTemas").value,doc.getElementById("tipoOperacao").value)}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){i3GEO.eventos.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(i3GEO.eventos.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUE)},executaEventos:function(eventos){try{var f,temp;if(eventos.length>0){f=eventos.length-1;if(f>=0){do{eval(eventos[f])}while(f--)}}}catch(e){}},posicaoMouseMapa:function(e){var teladd,teladms,container,targ,pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;try{container=e.target.parentNode.id}catch(erro){}if(container!=="divGeometriasTemp"){if((i3GEO.Interface.ATUAL==="googlemaps")||(i3GEO.Interface.ATUAL==="openlayers")){return}}if(!e){e=window.event}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((i3GEO.configura.entorno==="sim")&&(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);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout('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()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k;if(navm){k=event.button}else{k=exy.button}if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){if(arguments.length===0){var ixg="ixg",ixm="ixm",ixs="ixs",iyg="iyg",iym="iym",iys="iys",x,y;if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}else{var doc=document;x,y}if(g_tipoacao!=="capturaponto"){return}else{try{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){}}}}; -if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,nuvemTags:true,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true},FATORESTRELA:"1",INCLUISISTEMAS:true,INCLUIWMS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",IDHTML:null,LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,cor,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;cor="rgb(51, 102, 102)";for(i=0;i "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)"}else{html+=" (% de acessos não definido)"}html+="
";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1);tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:retorno.data[i].nome},node,false,true);tempNode.enableHighlight=false;if(!retorno.data[i].estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(retorno.data[i].estilos){ns=retorno.data[i].estilos.length;for(j=0;j";html+=layer+" - "+titulo;html+="";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
";insp+="";insp+="";insp+="";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp},root,false,false);tempNode.enableHighlight=false}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+" 
"},root,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    "},root,false,true);tempNode.enableHighlight=false;drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho},tempNode,false,true);drive.enableHighlight=false;drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig++}while(igSistema de administração",idmenu:""},root,false,true);tempNode.enableHighlight=false;tempNode=new YAHOO.widget.HTMLNode({html:"Editor de menus",idmenu:""},root,false,true);tempNode.enableHighlight=false}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    ",idwms:"raiz"},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i "+dados[i].nomemenu+""}else{conteudo=" "+dados[i].nomemenu+""}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status=="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"Sistemas"+"    "},root,false,true);tempNode.enableHighlight=false}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO=="NAO"||sis[ig].PUBLICADO=="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis},tempNode,false,true);sisNode.enableHighlight=false;funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc},sisNode,false,true);funcNode.enableHighlight=false;funcNode.isLeaf=true}ig++}while(ig"+grupos[i].nome+""}}d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;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,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i"+subgrupos[i].nome+""}}d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}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"+temas[i].nome+""}}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},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="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,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo=""+conteudo+"";nodeSHP=new YAHOO.widget.HTMLNode({html:conteudo,caminho:node.data.caminho+"/"+conteudo},node,false,true);nodeSHP.enableHighlight=false;nodeSHP.isLeaf=true}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html="";html+=tema.nome;html+="";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte!==""&&node.data.fonte!=" "){tempNode=new YAHOO.widget.HTMLNode({html:"Fonte"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}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";tempNode=new YAHOO.widget.HTMLNode({html:"Miniatura"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(node.data.ogc!="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz=="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({html:"WMS - OGC"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({html:"Qrcode"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}if(n>0){html=""}else{html=""}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i++}while(i=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg fonte"}d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+"";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta++}}}while(ig--)}else{d="Nada encontrado

";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas(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()},adicionaTemas:function(){var tsl,temp;clearTimeout(tempoBotaoAplicar);tempoBotaoAplicar="";i3GEO.temaAtivo="";tsl=i3GEO.arvoreDeTemas.listaTemasAtivos();i3GEO.arvoreDeTemas.desativaCheckbox();if(tsl.length>0){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");if(retorno.data.erro){alert(retorno.data.erro);return}i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!=i3GEO.guias.ATUAL){i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins=""};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var obGrupos,ins,ig;obGrupos=retorno.data;ins=""};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=""};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu){var combo=function(retorno){var ins,sg,ig;ins=""};i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)},dialogo:{nuvemTags:function(){i3GEO.janela.cria("350px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.htm","","","Nuvem de tags    ")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS    ")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T    ")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS    ")},upload:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")}},uploaddbf:function(){i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.htm","","","Upload DBF    ")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; +if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,nuvemTags:true,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true},FATORESTRELA:"1",INCLUISISTEMAS:true,INCLUIWMS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",IDHTML:null,LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,cor,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;cor="rgb(51, 102, 102)";for(i=0;i "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)"}else{html+=" (% de acessos não definido)"}html+="
";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1);tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:retorno.data[i].nome},node,false,true);tempNode.enableHighlight=false;if(!retorno.data[i].estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(retorno.data[i].estilos){ns=retorno.data[i].estilos.length;for(j=0;j";html+=layer+" - "+titulo;html+="";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
";insp+="";insp+="";insp+="";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp},root,false,false);tempNode.enableHighlight=false}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+" 
"},root,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    "},root,false,true);tempNode.enableHighlight=false;drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho},tempNode,false,true);drive.enableHighlight=false;drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig++}while(igSistema de administração",idmenu:""},root,false,true);tempNode.enableHighlight=false;tempNode=new YAHOO.widget.HTMLNode({html:"Editor de menus",idmenu:""},root,false,true);tempNode.enableHighlight=false}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    ",idwms:"raiz"},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i "+dados[i].nomemenu+""}else{conteudo=" "+dados[i].nomemenu+""}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status=="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"Sistemas"+"    "},root,false,true);tempNode.enableHighlight=false}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO=="NAO"||sis[ig].PUBLICADO=="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis},tempNode,false,true);sisNode.enableHighlight=false;funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc},sisNode,false,true);funcNode.enableHighlight=false;funcNode.isLeaf=true}ig++}while(ig"+grupos[i].nome+""}}d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;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,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i"+subgrupos[i].nome+""}}d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}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"+temas[i].nome+""}}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},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="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,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo=""+conteudo+"";nodeSHP=new YAHOO.widget.HTMLNode({html:conteudo,caminho:node.data.caminho+"/"+conteudo},node,false,true);nodeSHP.enableHighlight=false;nodeSHP.isLeaf=true}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html="";html+=tema.nome;html+="";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte!==""&&node.data.fonte!=" "){tempNode=new YAHOO.widget.HTMLNode({html:"Fonte"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}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";tempNode=new YAHOO.widget.HTMLNode({html:"Miniatura"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(node.data.ogc!="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz=="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({html:"WMS - OGC"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({html:"Qrcode"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}if(n>0){html=""}else{html=""}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i++}while(i=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg fonte"}d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+"";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta++}}}while(ig--)}else{d="Nada encontrado

";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas(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()},adicionaTemas:function(){var tsl,temp;clearTimeout(tempoBotaoAplicar);tempoBotaoAplicar="";i3GEO.temaAtivo="";tsl=i3GEO.arvoreDeTemas.listaTemasAtivos();i3GEO.arvoreDeTemas.desativaCheckbox();if(tsl.length>0){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");if(retorno.data.erro){alert(retorno.data.erro);return}i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!=i3GEO.guias.ATUAL){i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins=""};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var obGrupos,ins,ig;obGrupos=retorno.data;ins=""};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=""};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu){var combo=function(retorno){var ins,sg,ig;ins=""};i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)},dialogo:{nuvemTags:function(){i3GEO.janela.cria("350px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.htm","","","Nuvem de tags    ")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS    ")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T    ")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS    ")},upload:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")}},uploaddbf:function(){if(typeof(i3GEOF.uploaddbf)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")}},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaIcone:function(icone){var estilo,temp,ist,cor,ko;i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO=="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="laranja"||i3GEO.barraDeBotoes.COMPORTAMENTO=="vermelho"||i3GEO.barraDeBotoes.COMPORTAMENTO=="cinza"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="laranja"){cor="orange"}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="vermelho"){cor="red"}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="cinza"){cor="gray"}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b;if(arguments.length===0){padrao=i3GEO.barraDeBotoes.BOTAOPADRAO}i3GEO.barraDeBotoes.BOTAOCLICADO=padrao;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{if($i(l[b].iddiv)){if(l[b].conteudo){eval('$i(l[b].iddiv).innerHTML = "'+l[b].conteudo+'"')}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.ajuda.mostraJanela("'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.ajuda.mostraJanela("");};')}if(l[b].funcaoonclick){$i(l[b].iddiv).onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y){var tipo,mostra,numerobotoes,i,temp,elementos,nelementos,e,wj,recuo,novoel,alturadisponivel;wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(i3GEO.barraDeBotoes.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.OPACIDADE/100}}else{if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=0.85}}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){if($i("i3geo_rosa")){$i("i3geo_rosa").style.display="none"}if(i3GEO.barraDeBotoes.OPACIDADE){if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=0.85}}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.OPACIDADE/100}}};document.body.appendChild(novoel);if(i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";if(i3GEO.barraDeBotoes.AUTOALTURA){elementos=$i(idconteudonovo+"_").getElementsByTagName("img");if(elementos[0].id=="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");alturadisponivel=i3GEO.parametros.h-4;numerobotoes=parseInt(alturadisponivel/30,10);nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display==tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display=="block")||(e.style.display=="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i=0);mostra.style.display=tipo}}}}i3GEO.barraDeBotoes.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO){i3GEO.barraDeBotoes.ativaMenuContexto(idconteudonovo)}if($i(idconteudonovo+"_h")){$i(idconteudonovo+"_h").className="hd2"}},ativaMenuContexto:function(idbarra){var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender,id;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" "},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){eval("var id = 'contexto_"+idbarra+"'");$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){var n,i;if(arguments.length==1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i -/* -parametrosURL() -YAHOO.example.init = function () -{ - function onPushButtonsMarkupReady() - { - new YAHOO.widget.Button("botao1"); - } - YAHOO.util.Event.onContentReady("botao1", onPushButtonsMarkupReady); -}() -function submete() -{ - $i("f").submit() -} - -*/ \ No newline at end of file diff --git a/ferramentas/uploaddbf/index.js b/ferramentas/uploaddbf/index.js deleted file mode 100644 index 6c0c129..0000000 --- a/ferramentas/uploaddbf/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/* -About: Licença - -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet - -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br - -Este programa é software livre; você pode redistribuí-lo -e/ou modificá-lo sob os termos da Licença Pública Geral -GNU conforme publicada pela Free Software Foundation; -tanto a versão 2 da Licença. -Este programa é distribuído na expectativa de que seja útil, -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. -Consulte a Licença Pública Geral do GNU para mais detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral do -GNU junto com este programa; se não, escreva para a -Free Software Foundation, Inc., no endereço -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. -*/ -parametrosURL() - -if($i("temas")){ - aguarde("block") - comboTemasLigados("tema",function(retorno) - { - $i("temas").innerHTML = retorno.dados - aguarde("none") - $i("tema").onchange = function() - { - $i("itens").innerHTML = ""; - comboitens("item",$i("tema").value,function(retorno) - { - $i("itens").innerHTML = retorno.dados - },"itens","item") - if ($i("temas").value == "") - alert("Selecione um tema"); - } - },"temas","tema") -} -//document.getElementById("g_sid").value = g_sid -YAHOO.example.init = function () -{ - function onPushButtonsMarkupReady() - { - new YAHOO.widget.Button("botao1"); - } - YAHOO.util.Event.onContentReady("botao1", onPushButtonsMarkupReady); -}() -function submete() -{ - $i("f").submit() -} -if($i("listaepsg")) -{ - radioepsg - ( - function(retorno) - { - $i("listaepsg").innerHTML = retorno.dados - }, - "listaepsg" - ) -} \ No newline at end of file diff --git a/ferramentas/uploaddbf/index.js.php b/ferramentas/uploaddbf/index.js.php new file mode 100644 index 0000000..389a8b7 --- /dev/null +++ b/ferramentas/uploaddbf/index.js.php @@ -0,0 +1,186 @@ + +/*jslint plusplus:false,white:false,undef: false, rhino: true, onevar: true, evil: true */ +/* +Title: Upload de arquivo dbf + +File: i3geo/ferramentas/uploaddbf/index.js.php + +About: Licença + +I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet + +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil +Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br + +Este programa é software livre; você pode redistribuí-lo +e/ou modificá-lo sob os termos da Licença Pública Geral +GNU conforme publicada pela Free Software Foundation; +tanto a versão 2 da Licença. +Este programa é distribuído na expectativa de que seja útil, +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. +Consulte a Licença Pública Geral do GNU para mais detalhes. +Você deve ter recebido uma cópia da Licença Pública Geral do +GNU junto com este programa; se não, escreva para a +Free Software Foundation, Inc., no endereço +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. +*/ +if(typeof(i3GEOF) === 'undefined'){ + i3GEOF = []; +} +/* +Class: i3GEOF.uploaddbf + +Envia para o servidor um arquivo local (dbf ou csv) e insere como uma camada no mapa. +*/ +i3GEOF.uploaddbf = { + /* + Variavel: aguarde + + Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. + */ + aguarde: "", + /* + Function: inicia + + Inicia a ferramenta. É chamado por criaJanelaFlutuante + + Parametro: + + iddiv {String} - id do div que receberá o conteudo HTML da ferramenta + */ + inicia: function(iddiv){ + try{ + $i(iddiv).innerHTML += i3GEOF.uploaddbf.html(); + new YAHOO.widget.Button( + "i3GEOuploaddbfbotao1", + {onclick:{fn: i3GEOF.uploaddbf.submete}} + ); + i3GEO.util.radioEpsg( + function(retorno) + {$i("i3GEOuploaddbfListaepsg").innerHTML = retorno.dados;}, + "i3GEOuploaddbfListaepsg", + "uploaddbf" + ); + } + catch(erro){alert(erro);} + }, + /* + Function: html + + Gera o código html para apresentação das opções da ferramenta + + Retorno: + + String com o código html + */ + html:function(){ + var ins = '
' + + '

Tipo de arquivo:
'+ + '

'+ + + '

nome da coluna x:

' + + '

nome da coluna y:

' + + + '

arquivo:

' + + '

Projeção:

' + + '
' + + '

' + + '' + + '' + + '

' + + ''; + return ins; + }, + /* + Function: criaJanelaFlutuante + + Cria a janela flutuante para controle da ferramenta. + */ + criaJanelaFlutuante: function(){ + var janela,divid,temp,titulo,cabecalho,minimiza; + cabecalho = function(){}; + minimiza = function(){ + var temp = $i("i3GEOF.uploaddbf_corpo"); + if(temp){ + if(temp.style.display === "block") + {temp.style.display = "none";} + else + {temp.style.display = "block";} + } + }; + titulo = "Upload de arquivo de dados    "; + janela = i3GEO.janela.cria( + "300px", + "370px", + "", + "", + "", + titulo, + "i3GEOF.uploaddbf", + false, + "hd", + cabecalho, + minimiza + ); + divid = janela[2].id; + $i("i3GEOF.uploaddbf_corpo").style.backgroundColor = "white"; + i3GEOF.uploaddbf.aguarde = $i("i3GEOF.uploaddbf_imagemCabecalho").style; + i3GEOF.uploaddbf.inicia(divid); + }, + submete: function(){ + if(i3GEOF.uploaddbf.aguarde.visibility==="visible") + {return;} + i3GEOF.uploaddbf.aguarde.visibility="visible"; + $i("i3GEOuploaddbff").submit(); + } +}; + +/* +parametrosURL() +if($i("temas")){ + aguarde("block") + comboTemasLigados("tema",function(retorno) + { + $i("temas").innerHTML = retorno.dados + aguarde("none") + $i("tema").onchange = function() + { + $i("itens").innerHTML = ""; + comboitens("item",$i("tema").value,function(retorno) + { + $i("itens").innerHTML = retorno.dados + },"itens","item") + if ($i("temas").value == "") + alert("Selecione um tema"); + } + },"temas","tema") +} +YAHOO.example.init = function () +{ + function onPushButtonsMarkupReady() + { + new YAHOO.widget.Button("botao1"); + } + YAHOO.util.Event.onContentReady("botao1", onPushButtonsMarkupReady); +}() +function submete() +{ + $i("f").submit() +} +if($i("listaepsg")) +{ + radioepsg + ( + function(retorno) + { + $i("listaepsg").innerHTML = retorno.dados + }, + "listaepsg" + ) +} +*/ \ No newline at end of file diff --git a/ferramentas/uploaddbf/upload.php b/ferramentas/uploaddbf/upload.php index f4a1939..0862f5e 100644 --- a/ferramentas/uploaddbf/upload.php +++ b/ferramentas/uploaddbf/upload.php @@ -1,41 +1,26 @@ - +

ReadCSV(); $conta = 0; foreach($csv->HeaderData as $i) @@ -87,10 +71,10 @@ if (isset($_FILES['filedbf']['name'])) $def[] = array($i,"C","255"); $conta++; } - if(!function_exists(dbase_create)) - {xbase_create($dirmap."/".$nome.".dbf", $def);xbase_close($db);} + if(!function_exists("dbase_create")) + {xbase_create($dirmap."/".$nome.".dbf", $def);} else - {dbase_create($dirmap."/".$nome.".dbf", $def);dbase_close($db);} + {dbase_create($dirmap."/".$nome.".dbf", $def);} $db=xbase_open($dirmap."/".$nome.".dbf",2); foreach($dados as $d){ $reg = array(); @@ -99,11 +83,11 @@ if (isset($_FILES['filedbf']['name'])) xbase_add_record($db,$reg); } xbase_close($db); - $_FILES['filedbf']['name'] = $nome.".dbf"; + $_FILES['i3GEOuploaddbffile']['name'] = $nome.".dbf"; } echo "

Arquivo enviado. Criando shape file...

"; require_once("../../pacotes/phpxbase/api_conversion.php"); - $dbf = xbase_open($dirmap."/".$_FILES['filedbf']['name']); + $dbf = xbase_open($dirmap."/".$_FILES['i3GEOuploaddbffile']['name']); $records = xbase_numrecords($dbf); $record = array(); $novoshpf = ms_newShapefileObj($nomeshp, MS_SHP_POINT); @@ -147,7 +131,7 @@ if (isset($_FILES['filedbf']['name'])) $adiciona = ms_newLayerObj($mapa, $novolayer); $salvo = $mapa->save($map_file); echo "Tema criado!!!"; - echo ""; + echo ""; } else //join com um tema { @@ -155,7 +139,7 @@ if (isset($_FILES['filedbf']['name'])) //essa funcao ainda não está implementada // $dbf = $dirmap."/".$_FILES['filedbf']['name']; - $string = 'JOIN '."\n".' NAME "'.$_FILES['filedbf']['name'].'"'."\n"; + $string = 'JOIN '."\n".' NAME "'.$_FILES['i3GEOuploaddbffile']['name'].'"'."\n"; $string .= 'TABLE "'.$dbf.'"'."\n"; $string .= 'FROM "'.$item.'"'."\n"; $string .= 'TO "'.$colunadbf.'"'."\n"; @@ -173,9 +157,12 @@ if (isset($_FILES['filedbf']['name'])) else { echo "

Erro ao enviar o arquivo.

"; - exit; } } +paraAguarde(); +function paraAguarde(){ + echo ""; +} ?> \ No newline at end of file -- libgit2 0.21.2