From dc77e6208baefe5b04362d153134e7ec0d60d828 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 23 Feb 2011 13:17:43 +0000 Subject: [PATCH] Inclusão de ícone para abrir a legenda na árvore de camadas --- aplicmap/legenda.htm | 2 +- classesjs/classe_arvoredecamadas.js | 15 +++++++++++++++ classesjs/classe_barradebotoes.js | 13 +++++++------ classesjs/classe_mapa.js | 36 ++++++++++++++++++------------------ classesjs/compactados/classe_barradebotoes_compacto.js | 2 +- classesjs/compactados/classe_gadgets_compacto.js | 2 +- classesjs/compactados/classe_mapa_compacto.js | 2 +- classesjs/dicionario.js | 7 +++++++ classesjs/i3geo_tudo_compacto45.js | 6 +++--- classesjs/i3geo_tudo_compacto45.js.php | 6 +++--- css/botoes.css | 11 ++++++++++- css/botoes2.css | 18 ++++++++++++++++++ imagens/visual/default/sprite.png | Bin 34048 -> 0 bytes 13 files changed, 85 insertions(+), 35 deletions(-) diff --git a/aplicmap/legenda.htm b/aplicmap/legenda.htm index 41ff49f..c237e37 100644 --- a/aplicmap/legenda.htm +++ b/aplicmap/legenda.htm @@ -1 +1 @@ -[leg_layer_html opt_flag=1][if name=TEMA oper=neq value=NAO]
[if name=CLASSE oper=neq value=NAO][if name=legendawms oper=isset ][/if][/if]
 [metadata name=TEMA]
[/if][/leg_layer_html][leg_class_html][if name=CLASSE oper=neq value=NAO]
 [leg_class_name]
[/if][/leg_class_html] \ No newline at end of file +[leg_layer_html opt_flag=1][if name=TEMA oper=neq value=NAO]
[if name=CLASSE oper=neq value=NAO][if name=legendawms oper=isset ][/if][/if]
 [metadata name=TEMA]
[/if][/leg_layer_html][leg_class_html][if name=CLASSE oper=neq value=NAO]
 [leg_class_name]
[/if][/leg_class_html] \ No newline at end of file diff --git a/classesjs/classe_arvoredecamadas.js b/classesjs/classe_arvoredecamadas.js index 39002c7..3cee836 100644 --- a/classesjs/classe_arvoredecamadas.js +++ b/classesjs/classe_arvoredecamadas.js @@ -157,6 +157,18 @@ i3GEO.arvoreDeCamadas = { */ FILTRAR: true, /* + Propriedade: ABRELEGENDA + + Mostra o ícone para abrir a legenda do mapa. + + Default: + {true} + + Type: + {boolean} + */ + ABRELEGENDA: true, + /* Propriedade: EXPANDIDA Indica se a árvore será montada de forma expandida ou não. Se true, os nós do primeiro nível serão abertos na inicialização da árvore. @@ -445,6 +457,9 @@ i3GEO.arvoreDeCamadas = { {titulo += "";} if(this.FILTRAR === true) {titulo += "";} + if(this.ABRELEGENDA === true) + {titulo += "";} + if(this.LIGARDESLIGARTODOS === true){ titulo += " "; titulo += " "; diff --git a/classesjs/classe_barradebotoes.js b/classesjs/classe_barradebotoes.js index 6d5355c..d47d1a3 100644 --- a/classesjs/classe_barradebotoes.js +++ b/classesjs/classe_barradebotoes.js @@ -537,20 +537,21 @@ i3GEO.barraDeBotoes = { var falta,ticone,tipo,mostra,i,temp,elementos,e,wj,recuo,novoel,alturadisponivel,n,chaves,re,estilo, numerobotoes = 0, nelementos = 0, - Dom = YAHOO.util.Dom; + Dom = YAHOO.util.Dom, + branco = i3GEO.configura.locaplic+'/imagens/branco.gif'; if(this.AUTO === true){ if(idconteudo === "barraDeBotoes1"){ novoel = document.createElement("div"); novoel.id = "barraDeBotoes1"; temp = '
' + "
" + - 'zoom' + + 'zoom' + "
" + "
" + - 'desloca' + + 'desloca' + "
" + "
" + - 'geral' + + 'geral' + "
"; novoel.innerHTML = temp; document.body.appendChild(novoel); @@ -571,9 +572,9 @@ i3GEO.barraDeBotoes = { if(this.SOICONES === true) {estilo = "font-size:0px;";} novoel.innerHTML = ""+ - ""+ + ""+ "
sobe
sobe
" +temp+ - "
"; + "
"; document.body.appendChild(novoel); } else{ diff --git a/classesjs/classe_mapa.js b/classesjs/classe_mapa.js index d4950bb..e42cdf0 100644 --- a/classesjs/classe_mapa.js +++ b/classesjs/classe_mapa.js @@ -258,24 +258,24 @@ i3GEO.mapa = { if(typeof(console) !== 'undefined'){console.info("i3GEO.mapa.legendaHTML.atualiza()");} var idleg, temp = function(retorno){ - var s,ins,elementos,i; - if(i3GEO.mapa.legendaHTML.ID !== "" && $i(i3GEO.mapa.legendaHTML.ID)){ - if ((retorno.data !== "erro") && (retorno.data !== undefined)){ - s = i3GEO.configura.locaplic+"/imagens/solta.gif"; - ins = ""; - if(i3GEO.mapa.legendaHTML.incluiBotaoLibera === true) - {ins += "
";} - ins += "
"+ retorno.data.legenda + "
"; - $i(i3GEO.mapa.legendaHTML.ID).innerHTML = ins; + var s,ins,elementos,i; + if(i3GEO.mapa.legendaHTML.ID !== "" && $i(i3GEO.mapa.legendaHTML.ID)){ + if ((retorno.data !== "erro") && (retorno.data !== undefined)){ + s = i3GEO.configura.locaplic+"/imagens/branco.gif"; + ins = ""; + if(i3GEO.mapa.legendaHTML.incluiBotaoLibera === true) + {ins += '

Mostra a legenda em uma janela

';} + ins += "
"+ retorno.data.legenda + "
"; + $i(i3GEO.mapa.legendaHTML.ID).innerHTML = ins; + } } - } - if ($i("wlegenda")){ - $i("wlegenda").innerHTML = retorno.data.legenda; - elementos = $i("wlegenda").getElementsByTagName("input"); - for(i=0;i=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}else{estilo.border="0px solid white"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,d,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.barraDeBotoes.mostraJanela(this,"");};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}if(padrao===""){this.ativaIcone("")}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(this.TEMPLATEBOTAO===""){this.TEMPLATEBOTAO="
"}var falta,ticone,tipo,mostra,i,temp,elementos,e,wj,recuo,novoel,alturadisponivel,n,chaves,re,estilo,numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom;if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='
'+"
"+'zoom'+"
"+"
"+'desloca'+"
"+"
"+'geral'+"
";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i"+"sobe"+""+temp+"
";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}Dom.setStyle(novoel,"opacity",this.OPACIDADE/100);temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-28-28;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);falta=alturadisponivel-(ticone*numerobotoes);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(this.AUTOALTURA===true||(numerobotoesnumerobotoes)){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}if((barraZoom===true)&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.navega.barraDeZoom.ativa()}YAHOO.janelaBotoes.xp.panel.render();YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=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}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","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 abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;ifecha
"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="
fecha
"}}if(mensagem!==""){if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;divmensagem.style.display="block";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)}},escondeJanelaAjuda:function(){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");try{clearTimeout(timeAjudaBotoes)}catch(e){}}}; \ No newline at end of file +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={AJUDA:true,TIPOAJUDA:"horizontal",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:false,pan:false,zoomtot:false,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,reinicia:true,exten:true,referencia:true,inserexy:true,textofid:true,selecao:true,google:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(this.BOTAOPADRAO).onclick.apply()}catch(e){alert(e)}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}else{estilo.border="0px solid white"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,d,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.barraDeBotoes.mostraJanela(this,"");};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}if(padrao===""){this.ativaIcone("")}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(this.TEMPLATEBOTAO===""){this.TEMPLATEBOTAO="
"}var falta,ticone,tipo,mostra,i,temp,elementos,e,wj,recuo,novoel,alturadisponivel,n,chaves,re,estilo,numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='
'+"
"+'zoom'+"
"+"
"+'desloca'+"
"+"
"+'geral'+"
";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i"+"sobe"+""+temp+"
";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}Dom.setStyle(novoel,"opacity",this.OPACIDADE/100);temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-28-28;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);falta=alturadisponivel-(ticone*numerobotoes);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(this.AUTOALTURA===true||(numerobotoesnumerobotoes)){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}if((barraZoom===true)&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.navega.barraDeZoom.ativa()}YAHOO.janelaBotoes.xp.panel.render();YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=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}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","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 abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;ifecha
"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="
fecha
"}}if(mensagem!==""){if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;divmensagem.style.display="block";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)}},escondeJanelaAjuda:function(){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");try{clearTimeout(timeAjudaBotoes)}catch(e){}}}; \ No newline at end of file diff --git a/classesjs/compactados/classe_gadgets_compacto.js b/classesjs/compactados/classe_gadgets_compacto.js index 5a5c94d..c41a765 100644 --- a/classesjs/compactados/classe_gadgets_compacto.js +++ b/classesjs/compactados/classe_gadgets_compacto.js @@ -1 +1 @@ -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida"},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraVersao":{idhtml:"versaoi3geo"}},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"280","i3geo_urlkml","kml url","40","");ins="
Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="
";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){$i(id).style.display="block";atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}};if(!$i("i3geo_escalanum")){i=$inputText(id,"155","i3geo_escalanum",$trad("d10"),"15",parseInt(i3GEO.parametros.mapscale,10));ins="
1:"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="
";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}else{atualizaEscalaNumerica=function(){}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};i=$inputText(id,"210","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));ins="
   "+i;ins+="
";temp=$i(id);if(temp){temp.innerHTML=ins}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins=""}else{ins+="6px;'>"}ins+="";ins+="";ins+="";ins+="
 
";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else{marcadorZoom=0}}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual=0){do{visuais+=" "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){var imgstemp,imgs,i,temp,elementos,elt,caminho,j,busca,nimagem;try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");imgstemp=retorno.data.arquivos;imgs=[];i=imgstemp.length-1;if(i>=0){do{temp=imgstemp[i].split(".");if((temp[1]==="png")||(temp[1]==="gif")||(temp[1]==="jpg")){imgs.push(imgstemp[i])}}while(i--)}elementos=document.getElementsByTagName("img");elt=elementos.length;caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";j=imgs.length-1;if(j>=0){do{for(i=0;i-1)&&((elementos[i].className!=="")||(elementos[i].id!==""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+"sprite.png')"}}}while(j--)}j=imgs.length-1;if(j>=0){do{busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}elementos=["barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic"];i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:[],quadroatual:0,geraLegenda:false,inicia:function(qs,lugarquadros){if(i3GEO.Interface.ATUAL!=="padrao"){return}if(arguments.length===1){lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q,i,temp,p;q="";for(i=0;i
";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){temp=$i("imgClone");p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){if(i3GEO.Interface.ATUAL!=="padrao"){return}eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){if(i3GEO.Interface.ATUAL!=="padrao"){return}try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)===(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice,i,c,iclone;indice=quadro.replace("quadro","");i=$i(i3GEO.Interface.IDMAPA);c=$i("imgClone");if(i){if(!c){iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){}}},opcoes:function(obj){var js,volta;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{if(typeof(i3GEOF.opcoesQuadros)==='undefined'){js=i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script")}}},anima:function(Qanima,t){var doc;if(arguments.length===0){Qanima=0;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){var volta,wi,mensagem,i;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{wi=window.open("");mensagem="
Não existem imagens guardadas.";wi.document.write("

Click com o botão da direita do mouse sobre a imagem para fazer o download
");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("

Imagem: "+i+"
");wi.document.write("

Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"
");wi.document.write("");wi.document.write("");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("")}}i--}while(i>=0)}wi.document.write("
Fim");wi.document.close()}}},mostraMenuSuspenso:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=id}var objid,ins,sobe,alinhamento,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,MM=YAHOO.widget.MenuManager;objid=$i(id);if(objid){objid.className="yuimenubar";if($i("contemMenu")){$i("contemMenu").className="yui-navset"}if(!i3GEO.configura.oMenuData.menu){ins='

'+''+'
';objid.innerHTML=ins}else{ins="";alinhamento="";if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){alinhamento="left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"}ins+='
'+'
    ';n=i3GEO.configura.oMenuData.menu.length;for(i=0;i '+i3GEO.configura.oMenuData.menu[i].nome+''}ins+='
';ins+='
';objid.innerHTML=ins}onMenuBarBeforeRender=function(p_sType,p_sArgs){var conta,nomeMenu;if(i3GEO.parametros.w>=500){conta=0}else{conta=0}for(nomeMenu in i3GEO.configura.oMenuData.submenus){if($i("menu"+nomeMenu)){if(i3GEO.configura.oMenuData.submenus[nomeMenu]!==""){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:i3GEO.configura.oMenuData.submenus[nomeMenu]})}conta=conta+1}}};if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});MM.addMenu(i3GEOoMenuBar);i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();try{if(i3GEO.Interface.ATUAL==="padrao"&&$i("omenudataInterface1")){MM.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"&&$i("omenudataInterface2")){MM.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"&&$i("omenudataInterface3")){MM.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"&&$i("omenudataInterface4")){MM.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataInterface5")){MM.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){MM.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){MM.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";if(navn){temp.border="0px solid white"}else{temp.border="1px dotted white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}}}}; \ No newline at end of file +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida"},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraVersao":{idhtml:"versaoi3geo"}},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"280","i3geo_urlkml","kml url","40","");ins="
Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="
";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){$i(id).style.display="block";atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}};if(!$i("i3geo_escalanum")){i=$inputText(id,"155","i3geo_escalanum",$trad("d10"),"15",parseInt(i3GEO.parametros.mapscale,10));ins="
1:"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="
";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}else{atualizaEscalaNumerica=function(){}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};i=$inputText(id,"210","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));ins="
   "+i;ins+="
";temp=$i(id);if(temp){temp.innerHTML=ins}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins=""}else{ins+="6px;'>"}ins+="";ins+="";ins+="";ins+="
 
";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else{marcadorZoom=0}}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual=0){do{visuais+=" "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){var imgstemp,imgs,i,temp,elementos,elt,caminho,j,busca,nimagem;try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");imgstemp=retorno.data.arquivos;imgs=[];i=imgstemp.length-1;if(i>=0){do{temp=imgstemp[i].split(".");if((temp[1]==="png")||(temp[1]==="gif")||(temp[1]==="jpg")){imgs.push(imgstemp[i])}}while(i--)}elementos=document.getElementsByTagName("img");elt=elementos.length;caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";j=imgs.length-1;if(j>=0){do{for(i=0;i-1)&&((elementos[i].className!=="")||(elementos[i].id!==""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+"sprite.png')"}}}while(j--)}j=imgs.length-1;if(j>=0){do{busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}elementos=["barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic"];i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:[],quadroatual:0,geraLegenda:false,inicia:function(qs,lugarquadros){if(i3GEO.Interface.ATUAL!=="padrao"){return}if(arguments.length===1){lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q,i,temp,p;q="";for(i=0;i
";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){temp=$i("imgClone");p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){if(i3GEO.Interface.ATUAL!=="padrao"){return}eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){if(i3GEO.Interface.ATUAL!=="padrao"){return}try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)===(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice,i,c,iclone;indice=quadro.replace("quadro","");i=$i(i3GEO.Interface.IDMAPA);c=$i("imgClone");if(i){if(!c){iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){}}},opcoes:function(obj){var js,volta;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{if(typeof(i3GEOF.opcoesQuadros)==='undefined'){js=i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script")}}},anima:function(Qanima,t){var doc;if(arguments.length===0){Qanima=0;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){var volta,wi,mensagem,i;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{wi=window.open("");mensagem="
Não existem imagens guardadas.";wi.document.write("

Click com o botão da direita do mouse sobre a imagem para fazer o download
");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("

Imagem: "+i+"
");wi.document.write("

Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"
");wi.document.write("");wi.document.write("");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("")}}i--}while(i>=0)}wi.document.write("
Fim");wi.document.close()}}},mostraMenuSuspenso:function(id){var objid,sobe,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,MM=YAHOO.widget.MenuManager,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}ins+='

'+'
    ';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i '+confm.menu[i].nome+''}ins+='
';ins+='
';objid.innerHTML=ins;onMenuBarBeforeRender=function(p_sType,p_sArgs){var conta,nomeMenu,nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});MM.addMenu(i3GEOoMenuBar);i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();try{if(i3GEO.Interface.ATUAL==="padrao"){MM.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"){MM.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"){MM.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"){MM.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"){MM.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){MM.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){MM.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";if(navn){temp.border="0px solid white"}else{temp.border="1px dotted white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}}}}; \ No newline at end of file diff --git a/classesjs/compactados/classe_mapa_compacto.js b/classesjs/compactados/classe_mapa_compacto.js index cbf1637..d8558b5 100644 --- a/classesjs/compactados/classe_mapa_compacto.js +++ b/classesjs/compactados/classe_mapa_compacto.js @@ -1 +1 @@ -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={GEOXML:[],ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,imagemxref=0,imagemyref=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}i3GEO.php.ativalogo(i3GEO.atualiza)},verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var s,ins,elementos,i;if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){s=i3GEO.configura.locaplic+"/imagens/solta.gif";ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+="
"}ins+="
"+retorno.data.legenda+"
";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;iLegenda';temp+='
';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i   ")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j"+titulo+"
"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s"+alias+" :"+valor+"
"}if(valor!==""&&link!==""){ins+=""+alias+" : "+valor+"
"}if(img!==""){ins+=img+"
"}ins+="";mostra=true}else{ins+=""+valor+"
";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();balloon.delayTime=0;res="
"+res+"
";balloon.showTooltip($i("marcaIdentifica"),res);$i('marcaIdentifica').onclick=$i("closeButton").onclick}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}}catch(e){if(i3GEO.Interface.ATUAL==="padrao"){temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="hidden"}}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; \ No newline at end of file +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={GEOXML:[],ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,imagemxref=0,imagemyref=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}i3GEO.php.ativalogo(i3GEO.atualiza)},verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var s,ins,elementos,i;if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){s=i3GEO.configura.locaplic+"/imagens/branco.gif";ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+="
"}ins+="
"+retorno.data.legenda+"
";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;iLegenda';temp+='
';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i   ")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j"+titulo+"
"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s"+alias+" :"+valor+"
"}if(valor!==""&&link!==""){ins+=""+alias+" : "+valor+"
"}if(img!==""){ins+=img+"
"}ins+="";mostra=true}else{ins+=""+valor+"
";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();balloon.delayTime=0;res="
"+res+"
";balloon.showTooltip($i("marcaIdentifica"),res);$i('marcaIdentifica').onclick=$i("closeButton").onclick}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}}catch(e){if(i3GEO.Interface.ATUAL==="padrao"){temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="hidden"}}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; \ No newline at end of file diff --git a/classesjs/dicionario.js b/classesjs/dicionario.js index c7bfdb5..a6f1d61 100644 --- a/classesjs/dicionario.js +++ b/classesjs/dicionario.js @@ -424,6 +424,13 @@ en:"filtra a lista de camadas", es:"filtra a lista de camadas", it:"filtra a lista de camadas" }], +"t2b":[ +{ +pt:"Abre a legenda do mapa", +en:"Abre a legenda do mapa", +es:"Abre a legenda do mapa", +it:"Abre a legenda do mapa" +}], "t3":[ { pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.", diff --git a/classesjs/i3geo_tudo_compacto45.js b/classesjs/i3geo_tudo_compacto45.js index 7766dbd..958b5ea 100644 --- a/classesjs/i3geo_tudo_compacto45.js +++ b/classesjs/i3geo_tudo_compacto45.js @@ -357,7 +357,7 @@ function i3GEOmantemCompatibilidade(){try{i3GEO.configura.oMenuData=oMenuData}ca if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,latlng,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod,mx,sx,mm,restos,my,sy,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma,cosSigma,sigma,alpha,cosSqAlpha,cos2SigmaM,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pix,piy,pos,amext,dx,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dx=((amext[0]*-1)-(amext[2]*-1))/-1;dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,rectmap,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");rectmap=mapext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w;box.style.height=h;box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo)}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;ne.position="absolute";ne.width=i3GEO.parametros.w;ne.height=i3GEO.parametros.h;ne.border="0px solid black";ne.display="none";ne.top=pos[1];ne.left=pos[0];document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var pos,r,elemento,elementos,dy,dx,w,i,nindice,ix,iy,dm;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")&&navn){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if((tipo==="resizeLinha")&&navm){r=$i(i3GEO.desenho.richdraw.container.id);elementos=r.childNodes;if(desenhoUltimaLinha!==""){r.removeChild(desenhoUltimaLinha)}dy=pontosdistobj.yimg[n];dx=pontosdistobj.ximg[n];ix=(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2);iy=pontosdistobj.yimg[n-1];i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,ix,iy,dx,dy);desenhoUltimaLinha=r.childNodes[$i(i3GEO.desenho.richdraw.container.id).childNodes.length-1]}if((tipo==="resizePoligono")&&navm){try{r=$i(i3GEO.desenho.richdraw.container.id);elementos=r.childNodes;if(desenhoUltimaLinhaPol!==""){r.removeChild(desenhoUltimaLinhaPol)}dy=objposicaocursor.imgy;dx=objposicaocursor.imgx-(i3GEO.parametros.w/2);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])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],dx,dy);desenhoUltimaLinhaPol=r.childNodes[$i(i3GEO.desenho.richdraw.container.id).childNodes.length-1]}catch(men){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){if(navn){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}}else{try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x-w,y-w,w*2,w*2)}catch(men){}}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="";return caixa}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRAZOOMTOP:7,BARRAZOOMLEFT:10,ATUAL:"padrao",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[]},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"padrao":i3GEO.atualiza();break;case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){switch(i3GEO.Interface.ATUAL){case"padrao":break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)}},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno==="sim"){i3GEO.configura.entorno="nao";i3GEO.navega.entorno.ativaDesativa()}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia()},alteraParametroLayers:function(parametro,valor){switch(i3GEO.Interface.ATUAL){case"padrao":i3GEO.atualiza();break;case"flamingo":i3GEO.atualiza();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)}},ativaBotoes:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()},padrao:{TRANSICAO:false,redesenha:function(){var ndiv,i;if(!$i("img")){i3GEO.janela.fechaAguarde();return}$i("img").onload=function(){var imagem,temp;imagem=$i("img");imagem.onload="";i3GEO.gadgets.quadros.grava("imagem",i3GEO.parametros.mapimagem);i3GEO.gadgets.quadros.grava("extensao",i3GEO.parametros.mapexten);temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("legenda",legimagem)};if(i3GEO.gadgets.quadros.geraLegenda===true){i3GEO.mapa.legendaIMAGEM.obtem(temp)}if(i3GEO.Interface.padrao.TRANSICAO===true){if($i("imgtemp")){i3GEO.util.desaparece("imgtemp",50,5,true)}i3GEO.util.aparece("img",50,5)}else{if($i("imgtemp")){i3GEO.util.desaparece("imgtemp",15,5,true)}i3GEO.util.aparece("img",5,5)}i3GEO.janela.fechaAguarde("ajaxCorpoMapa")};if(!$i("imgtemp")){ndiv=document.createElement("div");ndiv.id="imgtemp";ndiv.style.position="absolute";ndiv.style.border="1px solid blue";document.getElementById("corpoMapa").appendChild(ndiv)}if(g_tipoacao==="pan"&&i3GEO.barraDeBotoes.BOTAOCLICADO==="pan"){$i("imgtemp").style.left=parseInt($i("img").style.left,10);$i("imgtemp").style.top=parseInt($i("img").style.top,10);$i("imgtemp").style.width=i3GEO.parametros.w;$i("imgtemp").style.height=i3GEO.parametros.h}$i("imgtemp").style.backgroundImage='url("'+$i("img").src+'")';$i("imgtemp").style.display="block";i=$i("img");i.style.display="none";i.style.left=0;i.style.top=0;i.src=i3GEO.parametros.mapimagem},cria:function(){var ins="";i3GEO.util.defineValor(i3GEO.Interface.IDCORPO,"innerHTML",ins);i3GEO.Interface.IDMAPA="img"},ativaMenuContexto:function(){var temp,oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;temp=$i("contexto_"+i3GEO.Interface.IDMAPA);if(temp){temp.parentNode.removeChild(temp)}oFieldContextMenuItemData=[{text:" "},{text:" Aproxima",onclick:{fn:i3GEO.navega.zoomin}},{text:" Afasta",onclick:{fn:i3GEO.navega.zoomout}},{text:" Norte",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:" Sul",onclick:{fn:i3GEO.navega.panFixoSul}},{text:" Leste",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:" Oeste",onclick:{fn:i3GEO.navega.panFixoOeste}},{text:"Captura",onclick:{fn:i3GEO.gadgets.quadros.listaImagens}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+i3GEO.Interface.IDMAPA,{trigger:i3GEO.Interface.IDMAPA,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+i3GEO.Interface.IDMAPA;if(id){$i(id).style.zIndex=50000}};oFieldContextMenu.subscribe("render",onFieldMenuRender)},inicia:function(){var i,estilo,elemento=($i("contemImg"))?"contemImg":"img",iu=i3GEO.util,configura=i3GEO.configura,gadgets=i3GEO.gadgets,parametros=i3GEO.parametros;i3GEO.mapa.ajustaPosicao(elemento);i=$i("img");if(!i){return}i.style.width=parametros.w+"px";i.style.height=parametros.h+"px";estilo=$i(i3GEO.Interface.IDCORPO).style;estilo.width=parametros.w+"px";estilo.height=parametros.h+"px";estilo.clip='rect('+0+" "+(parametros.w)+" "+(parametros.h)+" "+0+')';objmapaparado="nao";gadgets.mostraMenuSuspenso();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore(""+$trad("p13")+"","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.padrao.ativaBotoes();i3GEO.idioma.mostraSeletor();if(configura.mapaRefDisplay!=="none"){if(iu.pegaCookie("i3GEO.configura.mapaRefDisplay")){configura.mapaRefDisplay=iu.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}},ativaBotoes:function(){var x1,y1,x2,y2,imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)),barraDeBotoes=i3GEO.barraDeBotoes;if($i("barraDeBotoes1")||barraDeBotoes.AUTO===true){x1=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y1=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if(($i("barraDeBotoes1")&&$i("barraDeBotoes2"))||barraDeBotoes.AUTO===true){x1=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT+40}if($i("barraDeBotoes1")||barraDeBotoes.AUTO===true){barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1)}if($i("barraDeBotoes2")||barraDeBotoes.AUTO===true){barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}barraDeBotoes.ativaBotoes();if(document.getElementById("botao3d")){if(i3GEO.configura.map3d===""){document.getElementById("botao3d").style.display="none"}}if(i3GEO.Interface.ATIVAMENUCONTEXTO){i3GEO.Interface.padrao.ativaMenuContexto()}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}}},flamingo:{atualizaTema:function(retorno,tema){i3GEO.atualiza(retorno)},redesenha:function(){var w=parseInt($i("flamingo").style.width,10);if(w===i3GEO.parametros.w){$i("flamingo").style.height=parseInt($i("flamingo").style.height,10)+1}else{$i("flamingo").style.height=parseInt($i("flamingo").style.height,10)-1}i3GEO.janela.fechaAguarde()},cria:function(w,h){var i,f,ins;i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("flamingo");if(!f){ins='
';i.innerHTML=ins}f=$i("flamingo");f.style.width=w;f.style.height=h;i3GEO.Interface.IDMAPA="flamingo"}},inicia:function(){var monta=function(retorno){$i("flamingo").style.height=i3GEO.parametros.h+45;childPopups=[];childPopupNr=0;var so=new SWFObject(i3GEO.configura.locaplic+"/pacotes/flamingo/flamingo/flamingo.swf?config="+retorno.data,"flamingoi","100%","100%","8","#eaeaea");so.addParam("wmode","transparent");so.write("flamingo")};i3GEO.php.flamingo(monta);i3GEO.eventos.ativa($i("flamingo"));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore(""+$trad("p13")+"","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.001,-0.001,0.001,0.001],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;if(i){f=$i("openlayers");if(!f){ins='
';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3])})},inicia:function(){var montaMapa=function(){var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){pz=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(pz);pz.div.style.zIndex=5000;pz.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore(""+$trad("p16")+"","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}OLpan=new OpenLayers.Control.Navigation();OLzoom=new OpenLayers.Control.ZoomBox();OLpanel=new OpenLayers.Control.Panel();OLpanel.addControls([OLpan,OLzoom]);i3geoOL.addControl(OLpanel);openlayers.ativaBotoes();if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this)";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.arvoreDeCamadas.cria,i3GEO.util.arvore],[null,null,null,[i3GEO.parametros.mensagens],null,null,["",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic],[""+$trad("p13")+"","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa]],function(){})},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?map="+i3GEO.parametros.mapfile+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?layer=&tipolayer=fundo&map="+i3GEO.parametros.mapfile.replace(".map","fundo.map")+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name;try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""){urllayer=camada.wmsurl;layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{format:camada.wmsformat,transparent:true},opcoes)}else{if(camada.escondido==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status===0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},inverteModoTile:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];try{layer=i3geoOL.getLayersByName(camada.name)[0];if(camada.escondido!=="sim"){layer.singleTile=!i3GEO.Interface.openlayers.TILES}}catch(e){}}i3GEO.Interface.openlayers.atualizaMapa()},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];i3geoOL.setLayerIndex(layer,maiorindice+i)}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",b;if(layers.length>0){layers[0].setVisibility(obj.checked);if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id))},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i';i.innerHTML=ins}f=$i("googlemapsdiv");f.style.width=w;f.style.height=h}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,pt1,pt2,bottomLeft,bottomRight,i3GEOTile;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");function montaMapa(retorno){var pos,sw,ne,z,myMapType;try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),{scaleControl:true})}catch(e){alert(e);return}js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script");i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();i3GEO.gadgets.mostraInserirKml();i3GEO.Interface.googlemaps.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(i3GEO.Interface)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore(""+$trad("p13")+"","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.Interface.googlemaps.adicionaListaKml();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}}i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i"+nomeOverlay+"";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{alert("Arvore de camadas nao encontrada. Nao e possivel adicionar a arvore de KML");return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="
Google Maps
";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema);layer.getLink().setHref(layer.getLink().getHref()+"&");i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i"+$trad("p13")+"
","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(i3GEO.Interface)";i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w;i3GeoMap3d.style.height=h;i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1");i3GeoMap=null},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){function montaMapa(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot(),evento=function(e){i3GEO.Interface.googleearth.recalcPar();g_operacao="";g_tipoacao=""};options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");i3GEO.Interface.googleearth.adicionaListaKml();i3GEO.Interface.googleearth.registraEventos()}i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("
"+texto+"
");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{alert("Arvore de camadas nao encontrada. Nao e possivel adicionar a arvore de KML");return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="
Google Earth Kml
";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i
"}ins+="
"+retorno.data.legenda+"
";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;iLegenda';temp+='
';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i   ")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j"+titulo+"
"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s"+alias+" :"+valor+"
"}if(valor!==""&&link!==""){ins+=""+alias+" : "+valor+"
"}if(img!==""){ins+=img+"
"}ins+="";mostra=true}else{ins+=""+valor+"
";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();balloon.delayTime=0;res="
"+res+"
";balloon.showTooltip($i("marcaIdentifica"),res);$i('marcaIdentifica').onclick=$i("closeButton").onclick}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}}catch(e){if(i3GEO.Interface.ATUAL==="padrao"){temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="hidden"}}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={GEOXML:[],ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,imagemxref=0,imagemyref=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}i3GEO.php.ativalogo(i3GEO.atualiza)},verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var s,ins,elementos,i;if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){s=i3GEO.configura.locaplic+"/imagens/branco.gif";ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+="
"}ins+="
"+retorno.data.legenda+"
";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;iLegenda';temp+='
';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i   ")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j"+titulo+"
"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s"+alias+" :"+valor+"
"}if(valor!==""&&link!==""){ins+=""+alias+" : "+valor+"
"}if(img!==""){ins+=img+"
"}ins+="";mostra=true}else{ins+=""+valor+"
";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();balloon.delayTime=0;res="
"+res+"
";balloon.showTooltip($i("marcaIdentifica"),res);$i('marcaIdentifica').onclick=$i("closeButton").onclick}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}}catch(e){if(i3GEO.Interface.ATUAL==="padrao"){temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="hidden"}}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={exclui:function(tema){g_operacao="excluitema";var layer,indice,p;try{p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice)}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(tema);i3GeoMap.getFeatures().removeChild(indice)}i3GEO.php.excluitema(i3GEO.atualiza,tema);i3GEO.mapa.ativaTema("");if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(tema)[0];i3geoOL.removeLayer(layer)}},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.sobetema(temp,tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.descetema(temp,tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)};i3GEO.php.limpasel(temp,tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor,temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)};if($i("tr"+idtema)){valor=$i("tr"+idtema).value}else{alert("Ocorreu um erro")}if(valor!==""){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudatransp(temp,idtema,valor)}else{alert("Valor não definido.")}},invertestatuslegenda:function(idtema){alert("Essa opção afeta apenas a impressão do mapa");i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.invertestatuslegenda(temp,idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.aplicaCorClasseTema(temp,idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor;if($i("nn"+idtema)){valor=$i("nn"+idtema).value}else{alert("Ocorreu um erro")}if(valor!==""){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert("Nome não definido")}},mostralegendajanela:function(idtema,nome,tipoOperacao){var retorna,janela;if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}retorna=function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda};if(!$i("janelaLegenda"+idtema)){janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},dialogo:{comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"",""," Comentários de "+tema+"    ","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD    ")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo    ");atualizaLinhaDoTempo=function(){var doc,temp;try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}temp=doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){var temp=i3GEO.parametros.r==="nao"?alert("Opção não disponível"):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{pontosdistobj:{xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]},inicia:function(){i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,temp;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='
 Distância aproximada    
'+'
'+'
'+'
'+''+''+''+''+'
Raios '+''+'Textos'+' Estilo:'+i3GEO.desenho.caixaEstilos()+' 
'+'
'+'
';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","")}YAHOO.namespace("janelaDocamede.xp");YAHOO.janelaDocamede.xp.panel=new YAHOO.widget.Panel("mostradistancia",{width:300,fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaDocamede.xp.panel.render();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));YAHOO.janelaDocamede.xp.panel.moveTo(imagemxy[0]+150,imagemxy[1]);YAHOO.util.Event.addListener(YAHOO.janelaDocamede.xp.panel.close,"click",i3GEO.analise.medeDistancia.fechaJanela);temp=new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(i3GEO.analise.medeDistancia.pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var temp=i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");i3GEO.util.removeChild("mostradistancia_c");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}YAHOO.util.Event.removeListener(YAHOO.janelaDocamede.xp.panel.close,"click");i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes()},clique:function(){var n,d,decimal,dd,dV,pontosdistobj=i3GEO.analise.medeDistancia.pontosdistobj;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){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))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var temp,botaoPan=$i("pan");g_tipoacao="";temp=botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,pontosdistobj=i3GEO.analise.medeDistancia.pontosdistobj,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km
atual= "+d+" km
Direção (DMS)= "+r;texto+="
Método cálculo de distâncias: "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{pontosdistobj:{xpt:[],ypt:[],dist:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]},inicia:function(){var temp,x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}YAHOO.util.Event.addListener(YAHOO.janelaDocaarea.xp.panel.close,"click",i3GEO.analise.medeArea.fechaJanela);if(i3GEO.Interface.ATUAL==="padrao"){temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");var temp=retorno.data<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.areaPixel(temp,i3GEO.parametros.pixelsize)}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;temp=g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='
Área aproximada    
'+'
'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'
'+'
'+'
';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}YAHOO.namespace("janelaDocaarea.xp");YAHOO.janelaDocaarea.xp.panel=new YAHOO.widget.Panel("mostraarea",{width:220,fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaDocaarea.xp.panel.render();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));YAHOO.janelaDocaarea.xp.panel.moveTo(imagemxy[0]+150,imagemxy[1]);YAHOO.util.Event.addListener(YAHOO.janelaDocaarea.xp.panel.close,"click",i3GEO.analise.medeArea.fechaJanela)},fechaJanela:function(){i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);YAHOO.util.Event.removeListener(YAHOO.janelaDocaarea.xp.panel.close,"click");i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.util.removeChild("mostraarea_c",document.body);i3GEO.barraDeBotoes.ativaBotoes()},clique:function(){var n,m,pontosdistobj=i3GEO.analise.medeArea.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}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)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","
m2
= "+m.toFixed(2)+"
km2= "+(m/1000000).toFixed(2)+"
ha= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan"),temp;g_tipoacao="";temp=botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,decimal,da,m,pontosdistobj=i3GEO.analise.medeArea.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:true,OPACIDADE:55,TOP:4,RIGHT:0,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef;if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='
';ins+=' ";if(this.SELETORTIPO){ins+=""}ins+="
"}ins+='
';ins+='';ins+='
';novoel.innerHTML=ins;document.body.appendChild(novoel);if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)}}}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";YAHOO.namespace("janelaRef.xp");this.PERMITEDESLOCAR?temp="shadow":temp="none";YAHOO.janelaRef.xp.panel=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.janelaRef.xp.panel.render();r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 182px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}YAHOO.janelaRef.xp.panel.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close,"click");$i("imagemReferencia").src="";YAHOO.janelaRef.xp.panel.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if(typeof(atualizaLocalizarxy)==="function"){if($i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml)){YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",atualizaLocalizarxy)}}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var dinamico,tiporef,temp,re;dinamico=false;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if($i("imagemReferencia").src===""||i3GEO.parametros.utilizacgi!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference');i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{if($i("imagemReferencia")){i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var w,m,novoel,boxrefdd,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}i3GEO.gadgets.quadros.grava("referencia",refimagem);temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4;box.style.left=parseInt(box.style.left,10)+4;if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telaminxy,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; @@ -368,11 +368,11 @@ if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={FILTRO:"",VERIFI if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde('i3GEO.atualiza',$trad('o1'));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.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.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}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"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);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{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;i.top=objposicaocursor.telay;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(pos[0],10);$i("div_d").style.top=parseInt(pos[1],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(160,0,"","center","center","Feche para 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,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(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(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;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(){try{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}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(){if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();if(navn){i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps    ",idgoogle)}else{i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps    ",idgoogle)}atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; 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(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f,temp;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container,targ,pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}container=targ.parentNode.id}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if((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,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}else{doc=document}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,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,uploadgpx:true,comentarios:true,bookmark:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,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,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;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,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS,temp;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:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j"+layer+" - "+titulo+"";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 fonte"}if(ngSgrupo[sg].subgrupo){d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+""}else{d+=" ("+(ngSgrupo[sg].grupo)+")"+lk+""}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"Nada encontrado

",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(this.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){this.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){this.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){this.TIPOBOTAO=tipoBotao}this.LOCAPLIC=g_locaplic;this.SID=g_sid;if(this.IDHTML===""){return}this.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){this.ARVORE=null;i3GEO.arvoreDeTemas.cria(this.SID,this.LOCAPLIC,this.IDHTML)},montaArvore:function(){var newVal,currentIconMode,d,tempNode,tempNode1,retorno,nomeSis,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML);tempNode=new YAHOO.widget.TextNode({html:'',expanded:false,isLeaf:false,enableHighlight:false},root)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(this.OPCOESADICIONAIS.incluibusca===true){insp="

"+""+""+"";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(this.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(this.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" 
",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root);if(this.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    ",enableHighlight:false,expanded:false},root);drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(igSistema de administração",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"Editar árvore",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"Editar menus",idmenu:"",enableHighlight:false,expanded:false},root)}if(this.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor=""}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    "+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(this.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:" "+$trad("t46")+"    ",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=this.MENUS;c=dados.length;for(i=0,j=c;i"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo=" "+dados[i].nomemenu+""+editor}else{conteudo=" "+dados[i].nomemenu+""+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status==="aberto"){tempNode.expand()}}if(this.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"+"    ",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig"}else{editor=""}if(mostra){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome=""+grupos[i].nome+""}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(this.SID,this.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"}else{editor=""}if(mostra){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome=""+subgrupos[i].nome+""}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(this.SID,this.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,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(this.SID,this.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({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}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({isLeaf:true,enableHighlight:false,expanded:false,html:"Fonte"},node)}if(this.OPCOESADICIONAIS.mini===true){lkmini=this.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=this.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"Miniatura"},node)}if(node.data.ogc!=="nao"){if(this.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz==="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=this.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"WMS - OGC"},node)}if(node.data.permitecomentario!=="nao"&&this.OPCOESADICIONAIS.comentarios===true){html="Comentário";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(this.OPCOESADICIONAIS.qrcode===true){lkgrcode=this.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+this.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=this.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+this.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"Qrcode"},node)}if(this.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(this.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"":"";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(this.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif");if(this.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.uploadgpx===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.carousel===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(this.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}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+=1}}}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.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg;tempn=ngSgrupo.length;for(sg=0;sg fonte"}if(ngSgrupo[sg].subgrupo){d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+""}else{d+=" ("+(ngSgrupo[sg].grupo)+")"+lk+""}tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"Nada encontrado

"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};this.ARVORE.collapseAll();root=this.ARVORE.getRoot();if(!this.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=this.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){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;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var 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,temas){var combo=function(retorno){var ins,sg,ig,temas;ins=""};if(typeof(temas)==='undefined'){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js.php","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js.php","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},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(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js.php","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js.php","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={AJUDA:true,TIPOAJUDA:"horizontal",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:false,pan:false,zoomtot:false,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,reinicia:true,exten:true,referencia:true,inserexy:true,textofid:true,selecao:true,google:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(this.BOTAOPADRAO).onclick.apply()}catch(e){alert(e)}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}else{estilo.border="0px solid white"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,d,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.barraDeBotoes.mostraJanela(this,"");};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}if(padrao===""){this.ativaIcone("")}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(this.TEMPLATEBOTAO===""){this.TEMPLATEBOTAO="
"}var falta,ticone,tipo,mostra,i,temp,elementos,e,wj,recuo,novoel,alturadisponivel,n,chaves,re,estilo,numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom;if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='
'+"
"+'zoom'+"
"+"
"+'desloca'+"
"+"
"+'geral'+"
";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i"+"sobe"+""+temp+"
";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}Dom.setStyle(novoel,"opacity",this.OPACIDADE/100);temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-28-28;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);falta=alturadisponivel-(ticone*numerobotoes);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(this.AUTOALTURA===true||(numerobotoesnumerobotoes)){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}if((barraZoom===true)&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.navega.barraDeZoom.ativa()}YAHOO.janelaBotoes.xp.panel.render();YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=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}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","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 abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;ifecha
"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="
fecha
"}}if(mensagem!==""){if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;divmensagem.style.display="block";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)}},escondeJanelaAjuda:function(){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");try{clearTimeout(timeAjudaBotoes)}catch(e){}}}; +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={AJUDA:true,TIPOAJUDA:"horizontal",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:false,pan:false,zoomtot:false,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,reinicia:true,exten:true,referencia:true,inserexy:true,textofid:true,selecao:true,google:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(this.BOTAOPADRAO).onclick.apply()}catch(e){alert(e)}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}else{estilo.border="0px solid white"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,d,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.barraDeBotoes.mostraJanela(this,"");};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}if(padrao===""){this.ativaIcone("")}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(this.TEMPLATEBOTAO===""){this.TEMPLATEBOTAO="
"}var falta,ticone,tipo,mostra,i,temp,elementos,e,wj,recuo,novoel,alturadisponivel,n,chaves,re,estilo,numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='
'+"
"+'zoom'+"
"+"
"+'desloca'+"
"+"
"+'geral'+"
";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i"+"sobe"+""+temp+"
";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}Dom.setStyle(novoel,"opacity",this.OPACIDADE/100);temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-28-28;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);falta=alturadisponivel-(ticone*numerobotoes);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(this.AUTOALTURA===true||(numerobotoesnumerobotoes)){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}if((barraZoom===true)&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.navega.barraDeZoom.ativa()}YAHOO.janelaBotoes.xp.panel.render();YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=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}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","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 abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;ifecha
"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="
fecha
"}}if(mensagem!==""){if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;divmensagem.style.display="block";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)}},escondeJanelaAjuda:function(){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");try{clearTimeout(timeAjudaBotoes)}catch(e){}}}; function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}var tempUtm,s,n,i,t;if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="
UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+"  
";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{var ins;if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins=''+''+''+''+''+''+''+'',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+=''+""+"
'+titulo+' X: '+$inputText('','315',prefixo+'xg','grau','3','-00')+' '+$inputText('','',prefixo+'xm','minuto','3','00')+' '+$inputText('','',prefixo+'xs','segundo','5','00.00')+' Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+' '+$inputText('','',prefixo+'ym','minuto','3','00')+' '+$inputText('','',prefixo+'ys','segundo','5','00.00')+'"+caixa+"
";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"
"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins=""+""+""+""+""+"
"+titulo+" X: "+$inputText("","",prefixo+"X","X","12","00")+" Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" "+caixa+""+"
";return ins},atualizaProj4:function(onde,configProj,x,y){var destino,zona,temp,p,iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"
"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i";for(i=0;i"+temp.titulo+""}}caixa+="";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){$i(id).style.display="block";atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}};if(!$i("i3geo_escalanum")){i=$inputText(id,"155","i3geo_escalanum",$trad("d10"),"15",parseInt(i3GEO.parametros.mapscale,10));ins="
1:"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="
";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}else{atualizaEscalaNumerica=function(){}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};i=$inputText(id,"210","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));ins="
   "+i;ins+="
";temp=$i(id);if(temp){temp.innerHTML=ins}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins=""}else{ins+="6px;'>"}ins+="";ins+="";ins+="";ins+="
 
";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else{marcadorZoom=0}}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual=0){do{visuais+=" "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){var imgstemp,imgs,i,temp,elementos,elt,caminho,j,busca,nimagem;try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");imgstemp=retorno.data.arquivos;imgs=[];i=imgstemp.length-1;if(i>=0){do{temp=imgstemp[i].split(".");if((temp[1]==="png")||(temp[1]==="gif")||(temp[1]==="jpg")){imgs.push(imgstemp[i])}}while(i--)}elementos=document.getElementsByTagName("img");elt=elementos.length;caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";j=imgs.length-1;if(j>=0){do{for(i=0;i-1)&&((elementos[i].className!=="")||(elementos[i].id!==""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+"sprite.png')"}}}while(j--)}j=imgs.length-1;if(j>=0){do{busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}elementos=["barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic"];i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:[],quadroatual:0,geraLegenda:false,inicia:function(qs,lugarquadros){if(i3GEO.Interface.ATUAL!=="padrao"){return}if(arguments.length===1){lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q,i,temp,p;q="";for(i=0;i
";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){temp=$i("imgClone");p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){if(i3GEO.Interface.ATUAL!=="padrao"){return}eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){if(i3GEO.Interface.ATUAL!=="padrao"){return}try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)===(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice,i,c,iclone;indice=quadro.replace("quadro","");i=$i(i3GEO.Interface.IDMAPA);c=$i("imgClone");if(i){if(!c){iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){}}},opcoes:function(obj){var js,volta;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{if(typeof(i3GEOF.opcoesQuadros)==='undefined'){js=i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script")}}},anima:function(Qanima,t){var doc;if(arguments.length===0){Qanima=0;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){var volta,wi,mensagem,i;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{wi=window.open("");mensagem="
Não existem imagens guardadas.";wi.document.write("

Click com o botão da direita do mouse sobre a imagem para fazer o download
");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("

Imagem: "+i+"
");wi.document.write("

Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"
");wi.document.write("");wi.document.write("");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("")}}i--}while(i>=0)}wi.document.write("
Fim");wi.document.close()}}},mostraMenuSuspenso:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=id}var objid,ins,sobe,alinhamento,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,MM=YAHOO.widget.MenuManager;objid=$i(id);if(objid){objid.className="yuimenubar";if($i("contemMenu")){$i("contemMenu").className="yui-navset"}if(!i3GEO.configura.oMenuData.menu){ins='

'+''+'
';objid.innerHTML=ins}else{ins="";alinhamento="";if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){alinhamento="left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"}ins+='
'+'
    ';n=i3GEO.configura.oMenuData.menu.length;for(i=0;i '+i3GEO.configura.oMenuData.menu[i].nome+''}ins+='
';ins+='
';objid.innerHTML=ins}onMenuBarBeforeRender=function(p_sType,p_sArgs){var conta,nomeMenu;if(i3GEO.parametros.w>=500){conta=0}else{conta=0}for(nomeMenu in i3GEO.configura.oMenuData.submenus){if($i("menu"+nomeMenu)){if(i3GEO.configura.oMenuData.submenus[nomeMenu]!==""){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:i3GEO.configura.oMenuData.submenus[nomeMenu]})}conta=conta+1}}};if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});MM.addMenu(i3GEOoMenuBar);i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();try{if(i3GEO.Interface.ATUAL==="padrao"&&$i("omenudataInterface1")){MM.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"&&$i("omenudataInterface2")){MM.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"&&$i("omenudataInterface3")){MM.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"&&$i("omenudataInterface4")){MM.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataInterface5")){MM.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){MM.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){MM.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";if(navn){temp.border="0px solid white"}else{temp.border="1px dotted white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}}}}; +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida"},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraVersao":{idhtml:"versaoi3geo"}},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"280","i3geo_urlkml","kml url","40","");ins="
Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="
";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){$i(id).style.display="block";atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}};if(!$i("i3geo_escalanum")){i=$inputText(id,"155","i3geo_escalanum",$trad("d10"),"15",parseInt(i3GEO.parametros.mapscale,10));ins="
1:"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="
";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}else{atualizaEscalaNumerica=function(){}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};i=$inputText(id,"210","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));ins="
   "+i;ins+="
";temp=$i(id);if(temp){temp.innerHTML=ins}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins=""}else{ins+="6px;'>"}ins+="";ins+="";ins+="";ins+="
 
";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else{marcadorZoom=0}}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual=0){do{visuais+=" "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){var imgstemp,imgs,i,temp,elementos,elt,caminho,j,busca,nimagem;try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");imgstemp=retorno.data.arquivos;imgs=[];i=imgstemp.length-1;if(i>=0){do{temp=imgstemp[i].split(".");if((temp[1]==="png")||(temp[1]==="gif")||(temp[1]==="jpg")){imgs.push(imgstemp[i])}}while(i--)}elementos=document.getElementsByTagName("img");elt=elementos.length;caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";j=imgs.length-1;if(j>=0){do{for(i=0;i-1)&&((elementos[i].className!=="")||(elementos[i].id!==""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+"sprite.png')"}}}while(j--)}j=imgs.length-1;if(j>=0){do{busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}elementos=["barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic"];i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:[],quadroatual:0,geraLegenda:false,inicia:function(qs,lugarquadros){if(i3GEO.Interface.ATUAL!=="padrao"){return}if(arguments.length===1){lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q,i,temp,p;q="";for(i=0;i
";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){temp=$i("imgClone");p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){if(i3GEO.Interface.ATUAL!=="padrao"){return}eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){if(i3GEO.Interface.ATUAL!=="padrao"){return}try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)===(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice,i,c,iclone;indice=quadro.replace("quadro","");i=$i(i3GEO.Interface.IDMAPA);c=$i("imgClone");if(i){if(!c){iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){}}},opcoes:function(obj){var js,volta;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{if(typeof(i3GEOF.opcoesQuadros)==='undefined'){js=i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script")}}},anima:function(Qanima,t){var doc;if(arguments.length===0){Qanima=0;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){var volta,wi,mensagem,i;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{wi=window.open("");mensagem="
Não existem imagens guardadas.";wi.document.write("

Click com o botão da direita do mouse sobre a imagem para fazer o download
");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("

Imagem: "+i+"
");wi.document.write("

Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"
");wi.document.write("");wi.document.write("");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("")}}i--}while(i>=0)}wi.document.write("
Fim");wi.document.close()}}},mostraMenuSuspenso:function(id){var objid,sobe,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,MM=YAHOO.widget.MenuManager,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}ins+='

'+'
    ';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i '+confm.menu[i].nome+''}ins+='
';ins+='
';objid.innerHTML=ins;onMenuBarBeforeRender=function(p_sType,p_sArgs){var conta,nomeMenu,nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});MM.addMenu(i3GEOoMenuBar);i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();try{if(i3GEO.Interface.ATUAL==="padrao"){MM.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"){MM.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"){MM.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"){MM.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"){MM.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){MM.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){MM.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";if(navn){temp.border="0px solid white"}else{temp.border="1px dotted white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return""}if(tipo==="semtotal"){return""}},publicarTwitter:function(url,tipo){if(tipo==="comtotal"){return''}if(tipo==="semtotal"){return''}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+=""}if(tipo==="semtotal"){tabela+="
"}if(onde||id===""){if(urlpt!==""){tabela+=""}if(urlcf!==""){tabela+=""}tabela+="
"+i3GEO.social.publicarTwitter(urlpt,tipo)+""+i3GEO.social.curtirFacebook(urlcf,tipo)+"
";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins=" ";ins+=" ";ins+=" ";ins+="";return ins}}; diff --git a/classesjs/i3geo_tudo_compacto45.js.php b/classesjs/i3geo_tudo_compacto45.js.php index 3c7d953..efb0288 100644 --- a/classesjs/i3geo_tudo_compacto45.js.php +++ b/classesjs/i3geo_tudo_compacto45.js.php @@ -357,7 +357,7 @@ function i3GEOmantemCompatibilidade(){try{i3GEO.configura.oMenuData=oMenuData}ca if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,latlng,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod,mx,sx,mm,restos,my,sy,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma,cosSigma,sigma,alpha,cosSqAlpha,cos2SigmaM,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pix,piy,pos,amext,dx,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dx=((amext[0]*-1)-(amext[2]*-1))/-1;dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,rectmap,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");rectmap=mapext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w;box.style.height=h;box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo)}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;ne.position="absolute";ne.width=i3GEO.parametros.w;ne.height=i3GEO.parametros.h;ne.border="0px solid black";ne.display="none";ne.top=pos[1];ne.left=pos[0];document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var pos,r,elemento,elementos,dy,dx,w,i,nindice,ix,iy,dm;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")&&navn){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if((tipo==="resizeLinha")&&navm){r=$i(i3GEO.desenho.richdraw.container.id);elementos=r.childNodes;if(desenhoUltimaLinha!==""){r.removeChild(desenhoUltimaLinha)}dy=pontosdistobj.yimg[n];dx=pontosdistobj.ximg[n];ix=(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2);iy=pontosdistobj.yimg[n-1];i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,ix,iy,dx,dy);desenhoUltimaLinha=r.childNodes[$i(i3GEO.desenho.richdraw.container.id).childNodes.length-1]}if((tipo==="resizePoligono")&&navm){try{r=$i(i3GEO.desenho.richdraw.container.id);elementos=r.childNodes;if(desenhoUltimaLinhaPol!==""){r.removeChild(desenhoUltimaLinhaPol)}dy=objposicaocursor.imgy;dx=objposicaocursor.imgx-(i3GEO.parametros.w/2);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])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],dx,dy);desenhoUltimaLinhaPol=r.childNodes[$i(i3GEO.desenho.richdraw.container.id).childNodes.length-1]}catch(men){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){if(navn){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}}else{try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x-w,y-w,w*2,w*2)}catch(men){}}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="";return caixa}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRAZOOMTOP:7,BARRAZOOMLEFT:10,ATUAL:"padrao",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[]},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"padrao":i3GEO.atualiza();break;case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){switch(i3GEO.Interface.ATUAL){case"padrao":break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)}},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno==="sim"){i3GEO.configura.entorno="nao";i3GEO.navega.entorno.ativaDesativa()}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia()},alteraParametroLayers:function(parametro,valor){switch(i3GEO.Interface.ATUAL){case"padrao":i3GEO.atualiza();break;case"flamingo":i3GEO.atualiza();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)}},ativaBotoes:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()},padrao:{TRANSICAO:false,redesenha:function(){var ndiv,i;if(!$i("img")){i3GEO.janela.fechaAguarde();return}$i("img").onload=function(){var imagem,temp;imagem=$i("img");imagem.onload="";i3GEO.gadgets.quadros.grava("imagem",i3GEO.parametros.mapimagem);i3GEO.gadgets.quadros.grava("extensao",i3GEO.parametros.mapexten);temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("legenda",legimagem)};if(i3GEO.gadgets.quadros.geraLegenda===true){i3GEO.mapa.legendaIMAGEM.obtem(temp)}if(i3GEO.Interface.padrao.TRANSICAO===true){if($i("imgtemp")){i3GEO.util.desaparece("imgtemp",50,5,true)}i3GEO.util.aparece("img",50,5)}else{if($i("imgtemp")){i3GEO.util.desaparece("imgtemp",15,5,true)}i3GEO.util.aparece("img",5,5)}i3GEO.janela.fechaAguarde("ajaxCorpoMapa")};if(!$i("imgtemp")){ndiv=document.createElement("div");ndiv.id="imgtemp";ndiv.style.position="absolute";ndiv.style.border="1px solid blue";document.getElementById("corpoMapa").appendChild(ndiv)}if(g_tipoacao==="pan"&&i3GEO.barraDeBotoes.BOTAOCLICADO==="pan"){$i("imgtemp").style.left=parseInt($i("img").style.left,10);$i("imgtemp").style.top=parseInt($i("img").style.top,10);$i("imgtemp").style.width=i3GEO.parametros.w;$i("imgtemp").style.height=i3GEO.parametros.h}$i("imgtemp").style.backgroundImage='url("'+$i("img").src+'")';$i("imgtemp").style.display="block";i=$i("img");i.style.display="none";i.style.left=0;i.style.top=0;i.src=i3GEO.parametros.mapimagem},cria:function(){var ins="";i3GEO.util.defineValor(i3GEO.Interface.IDCORPO,"innerHTML",ins);i3GEO.Interface.IDMAPA="img"},ativaMenuContexto:function(){var temp,oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;temp=$i("contexto_"+i3GEO.Interface.IDMAPA);if(temp){temp.parentNode.removeChild(temp)}oFieldContextMenuItemData=[{text:" "},{text:" Aproxima",onclick:{fn:i3GEO.navega.zoomin}},{text:" Afasta",onclick:{fn:i3GEO.navega.zoomout}},{text:" Norte",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:" Sul",onclick:{fn:i3GEO.navega.panFixoSul}},{text:" Leste",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:" Oeste",onclick:{fn:i3GEO.navega.panFixoOeste}},{text:"Captura",onclick:{fn:i3GEO.gadgets.quadros.listaImagens}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+i3GEO.Interface.IDMAPA,{trigger:i3GEO.Interface.IDMAPA,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+i3GEO.Interface.IDMAPA;if(id){$i(id).style.zIndex=50000}};oFieldContextMenu.subscribe("render",onFieldMenuRender)},inicia:function(){var i,estilo,elemento=($i("contemImg"))?"contemImg":"img",iu=i3GEO.util,configura=i3GEO.configura,gadgets=i3GEO.gadgets,parametros=i3GEO.parametros;i3GEO.mapa.ajustaPosicao(elemento);i=$i("img");if(!i){return}i.style.width=parametros.w+"px";i.style.height=parametros.h+"px";estilo=$i(i3GEO.Interface.IDCORPO).style;estilo.width=parametros.w+"px";estilo.height=parametros.h+"px";estilo.clip='rect('+0+" "+(parametros.w)+" "+(parametros.h)+" "+0+')';objmapaparado="nao";gadgets.mostraMenuSuspenso();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore(""+$trad("p13")+"","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.padrao.ativaBotoes();i3GEO.idioma.mostraSeletor();if(configura.mapaRefDisplay!=="none"){if(iu.pegaCookie("i3GEO.configura.mapaRefDisplay")){configura.mapaRefDisplay=iu.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}},ativaBotoes:function(){var x1,y1,x2,y2,imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)),barraDeBotoes=i3GEO.barraDeBotoes;if($i("barraDeBotoes1")||barraDeBotoes.AUTO===true){x1=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y1=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if(($i("barraDeBotoes1")&&$i("barraDeBotoes2"))||barraDeBotoes.AUTO===true){x1=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT+40}if($i("barraDeBotoes1")||barraDeBotoes.AUTO===true){barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1)}if($i("barraDeBotoes2")||barraDeBotoes.AUTO===true){barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}barraDeBotoes.ativaBotoes();if(document.getElementById("botao3d")){if(i3GEO.configura.map3d===""){document.getElementById("botao3d").style.display="none"}}if(i3GEO.Interface.ATIVAMENUCONTEXTO){i3GEO.Interface.padrao.ativaMenuContexto()}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}}},flamingo:{atualizaTema:function(retorno,tema){i3GEO.atualiza(retorno)},redesenha:function(){var w=parseInt($i("flamingo").style.width,10);if(w===i3GEO.parametros.w){$i("flamingo").style.height=parseInt($i("flamingo").style.height,10)+1}else{$i("flamingo").style.height=parseInt($i("flamingo").style.height,10)-1}i3GEO.janela.fechaAguarde()},cria:function(w,h){var i,f,ins;i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("flamingo");if(!f){ins='
';i.innerHTML=ins}f=$i("flamingo");f.style.width=w;f.style.height=h;i3GEO.Interface.IDMAPA="flamingo"}},inicia:function(){var monta=function(retorno){$i("flamingo").style.height=i3GEO.parametros.h+45;childPopups=[];childPopupNr=0;var so=new SWFObject(i3GEO.configura.locaplic+"/pacotes/flamingo/flamingo/flamingo.swf?config="+retorno.data,"flamingoi","100%","100%","8","#eaeaea");so.addParam("wmode","transparent");so.write("flamingo")};i3GEO.php.flamingo(monta);i3GEO.eventos.ativa($i("flamingo"));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore(""+$trad("p13")+"","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.001,-0.001,0.001,0.001],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;if(i){f=$i("openlayers");if(!f){ins='
';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3])})},inicia:function(){var montaMapa=function(){var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){pz=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(pz);pz.div.style.zIndex=5000;pz.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore(""+$trad("p16")+"","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}OLpan=new OpenLayers.Control.Navigation();OLzoom=new OpenLayers.Control.ZoomBox();OLpanel=new OpenLayers.Control.Panel();OLpanel.addControls([OLpan,OLzoom]);i3geoOL.addControl(OLpanel);openlayers.ativaBotoes();if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this)";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.arvoreDeCamadas.cria,i3GEO.util.arvore],[null,null,null,[i3GEO.parametros.mensagens],null,null,["",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic],[""+$trad("p13")+"","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa]],function(){})},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?map="+i3GEO.parametros.mapfile+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?layer=&tipolayer=fundo&map="+i3GEO.parametros.mapfile.replace(".map","fundo.map")+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name;try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""){urllayer=camada.wmsurl;layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{format:camada.wmsformat,transparent:true},opcoes)}else{if(camada.escondido==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status===0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},inverteModoTile:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];try{layer=i3geoOL.getLayersByName(camada.name)[0];if(camada.escondido!=="sim"){layer.singleTile=!i3GEO.Interface.openlayers.TILES}}catch(e){}}i3GEO.Interface.openlayers.atualizaMapa()},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];i3geoOL.setLayerIndex(layer,maiorindice+i)}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",b;if(layers.length>0){layers[0].setVisibility(obj.checked);if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id))},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i';i.innerHTML=ins}f=$i("googlemapsdiv");f.style.width=w;f.style.height=h}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,pt1,pt2,bottomLeft,bottomRight,i3GEOTile;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");function montaMapa(retorno){var pos,sw,ne,z,myMapType;try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),{scaleControl:true})}catch(e){alert(e);return}js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script");i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();i3GEO.gadgets.mostraInserirKml();i3GEO.Interface.googlemaps.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(i3GEO.Interface)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore(""+$trad("p13")+"","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.Interface.googlemaps.adicionaListaKml();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}}i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i"+nomeOverlay+"";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{alert("Arvore de camadas nao encontrada. Nao e possivel adicionar a arvore de KML");return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="
Google Maps
";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema);layer.getLink().setHref(layer.getLink().getHref()+"&");i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i"+$trad("p13")+"
","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(i3GEO.Interface)";i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w;i3GeoMap3d.style.height=h;i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1");i3GeoMap=null},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){function montaMapa(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot(),evento=function(e){i3GEO.Interface.googleearth.recalcPar();g_operacao="";g_tipoacao=""};options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");i3GEO.Interface.googleearth.adicionaListaKml();i3GEO.Interface.googleearth.registraEventos()}i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("
"+texto+"
");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{alert("Arvore de camadas nao encontrada. Nao e possivel adicionar a arvore de KML");return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="
Google Earth Kml
";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i
"}ins+="
"+retorno.data.legenda+"
";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;iLegenda';temp+='
';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i   ")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j"+titulo+"
"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s"+alias+" :"+valor+"
"}if(valor!==""&&link!==""){ins+=""+alias+" : "+valor+"
"}if(img!==""){ins+=img+"
"}ins+="";mostra=true}else{ins+=""+valor+"
";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();balloon.delayTime=0;res="
"+res+"
";balloon.showTooltip($i("marcaIdentifica"),res);$i('marcaIdentifica').onclick=$i("closeButton").onclick}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}}catch(e){if(i3GEO.Interface.ATUAL==="padrao"){temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="hidden"}}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={GEOXML:[],ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,imagemxref=0,imagemyref=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}i3GEO.php.ativalogo(i3GEO.atualiza)},verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var s,ins,elementos,i;if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){s=i3GEO.configura.locaplic+"/imagens/branco.gif";ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+="
"}ins+="
"+retorno.data.legenda+"
";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;iLegenda';temp+='
';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i   ")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j"+titulo+"
"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s"+alias+" :"+valor+"
"}if(valor!==""&&link!==""){ins+=""+alias+" : "+valor+"
"}if(img!==""){ins+=img+"
"}ins+="";mostra=true}else{ins+=""+valor+"
";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();balloon.delayTime=0;res="
"+res+"
";balloon.showTooltip($i("marcaIdentifica"),res);$i('marcaIdentifica').onclick=$i("closeButton").onclick}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}}catch(e){if(i3GEO.Interface.ATUAL==="padrao"){temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="hidden"}}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={exclui:function(tema){g_operacao="excluitema";var layer,indice,p;try{p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice)}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(tema);i3GeoMap.getFeatures().removeChild(indice)}i3GEO.php.excluitema(i3GEO.atualiza,tema);i3GEO.mapa.ativaTema("");if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(tema)[0];i3geoOL.removeLayer(layer)}},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.sobetema(temp,tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.descetema(temp,tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)};i3GEO.php.limpasel(temp,tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor,temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)};if($i("tr"+idtema)){valor=$i("tr"+idtema).value}else{alert("Ocorreu um erro")}if(valor!==""){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudatransp(temp,idtema,valor)}else{alert("Valor não definido.")}},invertestatuslegenda:function(idtema){alert("Essa opção afeta apenas a impressão do mapa");i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.invertestatuslegenda(temp,idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.aplicaCorClasseTema(temp,idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor;if($i("nn"+idtema)){valor=$i("nn"+idtema).value}else{alert("Ocorreu um erro")}if(valor!==""){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert("Nome não definido")}},mostralegendajanela:function(idtema,nome,tipoOperacao){var retorna,janela;if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}retorna=function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda};if(!$i("janelaLegenda"+idtema)){janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},dialogo:{comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"",""," Comentários de "+tema+"    ","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD    ")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo    ");atualizaLinhaDoTempo=function(){var doc,temp;try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}temp=doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){var temp=i3GEO.parametros.r==="nao"?alert("Opção não disponível"):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{pontosdistobj:{xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]},inicia:function(){i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,temp;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='
 Distância aproximada    
'+'
'+'
'+'
'+''+''+''+''+'
Raios '+''+'Textos'+' Estilo:'+i3GEO.desenho.caixaEstilos()+' 
'+'
'+'
';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","")}YAHOO.namespace("janelaDocamede.xp");YAHOO.janelaDocamede.xp.panel=new YAHOO.widget.Panel("mostradistancia",{width:300,fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaDocamede.xp.panel.render();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));YAHOO.janelaDocamede.xp.panel.moveTo(imagemxy[0]+150,imagemxy[1]);YAHOO.util.Event.addListener(YAHOO.janelaDocamede.xp.panel.close,"click",i3GEO.analise.medeDistancia.fechaJanela);temp=new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(i3GEO.analise.medeDistancia.pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var temp=i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");i3GEO.util.removeChild("mostradistancia_c");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}YAHOO.util.Event.removeListener(YAHOO.janelaDocamede.xp.panel.close,"click");i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes()},clique:function(){var n,d,decimal,dd,dV,pontosdistobj=i3GEO.analise.medeDistancia.pontosdistobj;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){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))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var temp,botaoPan=$i("pan");g_tipoacao="";temp=botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,pontosdistobj=i3GEO.analise.medeDistancia.pontosdistobj,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km
atual= "+d+" km
Direção (DMS)= "+r;texto+="
Método cálculo de distâncias: "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{pontosdistobj:{xpt:[],ypt:[],dist:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]},inicia:function(){var temp,x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}YAHOO.util.Event.addListener(YAHOO.janelaDocaarea.xp.panel.close,"click",i3GEO.analise.medeArea.fechaJanela);if(i3GEO.Interface.ATUAL==="padrao"){temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");var temp=retorno.data<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.areaPixel(temp,i3GEO.parametros.pixelsize)}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;temp=g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='
Área aproximada    
'+'
'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'
'+'
'+'
';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}YAHOO.namespace("janelaDocaarea.xp");YAHOO.janelaDocaarea.xp.panel=new YAHOO.widget.Panel("mostraarea",{width:220,fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaDocaarea.xp.panel.render();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));YAHOO.janelaDocaarea.xp.panel.moveTo(imagemxy[0]+150,imagemxy[1]);YAHOO.util.Event.addListener(YAHOO.janelaDocaarea.xp.panel.close,"click",i3GEO.analise.medeArea.fechaJanela)},fechaJanela:function(){i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);YAHOO.util.Event.removeListener(YAHOO.janelaDocaarea.xp.panel.close,"click");i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.util.removeChild("mostraarea_c",document.body);i3GEO.barraDeBotoes.ativaBotoes()},clique:function(){var n,m,pontosdistobj=i3GEO.analise.medeArea.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}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)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","
m2
= "+m.toFixed(2)+"
km2= "+(m/1000000).toFixed(2)+"
ha= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["padrao","openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan"),temp;g_tipoacao="";temp=botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,decimal,da,m,pontosdistobj=i3GEO.analise.medeArea.pontosdistobj;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:true,OPACIDADE:55,TOP:4,RIGHT:0,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef;if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='
';ins+=' ";if(this.SELETORTIPO){ins+=""}ins+="
"}ins+='
';ins+='';ins+='
';novoel.innerHTML=ins;document.body.appendChild(novoel);if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)}}}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";YAHOO.namespace("janelaRef.xp");this.PERMITEDESLOCAR?temp="shadow":temp="none";YAHOO.janelaRef.xp.panel=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.janelaRef.xp.panel.render();r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 182px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}YAHOO.janelaRef.xp.panel.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close,"click");$i("imagemReferencia").src="";YAHOO.janelaRef.xp.panel.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if(typeof(atualizaLocalizarxy)==="function"){if($i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml)){YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",atualizaLocalizarxy)}}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var dinamico,tiporef,temp,re;dinamico=false;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if($i("imagemReferencia").src===""||i3GEO.parametros.utilizacgi!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference');i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{if($i("imagemReferencia")){i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var w,m,novoel,boxrefdd,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}i3GEO.gadgets.quadros.grava("referencia",refimagem);temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4;box.style.left=parseInt(box.style.left,10)+4;if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telaminxy,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; @@ -368,13 +368,13 @@ if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={FILTRO:"",VERIFI if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde('i3GEO.atualiza',$trad('o1'));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.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.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}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"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);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{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;i.top=objposicaocursor.telay;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(pos[0],10);$i("div_d").style.top=parseInt(pos[1],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(160,0,"","center","center","Feche para 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,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(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(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;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(){try{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}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(){if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();if(navn){i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps    ",idgoogle)}else{i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps    ",idgoogle)}atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; 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(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f,temp;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container,targ,pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}container=targ.parentNode.id}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if((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,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}else{doc=document}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,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,uploadgpx:true,comentarios:true,bookmark:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,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,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;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,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS,temp;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:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j"+layer+" - "+titulo+"";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 fonte"}if(ngSgrupo[sg].subgrupo){d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+""}else{d+=" ("+(ngSgrupo[sg].grupo)+")"+lk+""}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"Nada encontrado

",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(this.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){this.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){this.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){this.TIPOBOTAO=tipoBotao}this.LOCAPLIC=g_locaplic;this.SID=g_sid;if(this.IDHTML===""){return}this.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){this.ARVORE=null;i3GEO.arvoreDeTemas.cria(this.SID,this.LOCAPLIC,this.IDHTML)},montaArvore:function(){var newVal,currentIconMode,d,tempNode,tempNode1,retorno,nomeSis,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML);tempNode=new YAHOO.widget.TextNode({html:'',expanded:false,isLeaf:false,enableHighlight:false},root)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(this.OPCOESADICIONAIS.incluibusca===true){insp="

"+""+""+"";insp+="
 "+$trad("a1")+"    
 ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(this.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(this.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" 
",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root);if(this.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+"    ",enableHighlight:false,expanded:false},root);drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(igSistema de administração",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"Editar árvore",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"Editar menus",idmenu:"",enableHighlight:false,expanded:false},root)}if(this.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor=""}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:" OGC-WMS"+"    "+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(this.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:" "+$trad("t46")+"    ",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=this.MENUS;c=dados.length;for(i=0,j=c;i"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo=" "+dados[i].nomemenu+""+editor}else{conteudo=" "+dados[i].nomemenu+""+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status==="aberto"){tempNode.expand()}}if(this.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"+"    ",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis=""+sis[ig].NOME+""}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2"+funcoes[ig2].NOME+"";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig"}else{editor=""}if(mostra){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome=""+grupos[i].nome+""}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(this.SID,this.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"}else{editor=""}if(mostra){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome=""+subgrupos[i].nome+""}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(this.SID,this.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,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(this.SID,this.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({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}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({isLeaf:true,enableHighlight:false,expanded:false,html:"Fonte"},node)}if(this.OPCOESADICIONAIS.mini===true){lkmini=this.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=this.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"Miniatura"},node)}if(node.data.ogc!=="nao"){if(this.OPCOESADICIONAIS.kml===true){html="Kml";if(node.data.kmz==="sim"){html="Kml"}tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=this.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"WMS - OGC"},node)}if(node.data.permitecomentario!=="nao"&&this.OPCOESADICIONAIS.comentarios===true){html="Comentário";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(this.OPCOESADICIONAIS.qrcode===true){lkgrcode=this.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+this.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=this.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+this.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"Qrcode"},node)}if(this.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(this.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"":"";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(this.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif");if(this.OPCOESADICIONAIS.refresh===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.uploadgpx===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.uploaddbf===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.uploadlocal===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.downloadbase===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.conectarwms===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.conectarwmst===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.conectargeorss===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.nuvemTags===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="";t+=20}if(this.OPCOESADICIONAIS.carousel===true){ins+="";t+=20}return(""+ins+"
")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(this.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}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+=1}}}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.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg;tempn=ngSgrupo.length;for(sg=0;sg fonte"}if(ngSgrupo[sg].subgrupo){d+=" ("+(ngSgrupo[sg].subgrupo)+") "+lk+""}else{d+=" ("+(ngSgrupo[sg].grupo)+")"+lk+""}tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"Nada encontrado

"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};this.ARVORE.collapseAll();root=this.ARVORE.getRoot();if(!this.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=this.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){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;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var 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,temas){var combo=function(retorno){var ins,sg,ig,temas;ins=""};if(typeof(temas)==='undefined'){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js.php","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js.php","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},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(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js.php","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js.php","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={AJUDA:true,TIPOAJUDA:"horizontal",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:false,pan:false,zoomtot:false,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,reinicia:true,exten:true,referencia:true,inserexy:true,textofid:true,selecao:true,google:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(this.BOTAOPADRAO).onclick.apply()}catch(e){alert(e)}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}else{estilo.border="0px solid white"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,d,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.barraDeBotoes.mostraJanela(this,"");};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}if(padrao===""){this.ativaIcone("")}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(this.TEMPLATEBOTAO===""){this.TEMPLATEBOTAO="
"}var falta,ticone,tipo,mostra,i,temp,elementos,e,wj,recuo,novoel,alturadisponivel,n,chaves,re,estilo,numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom;if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='
'+"
"+'zoom'+"
"+"
"+'desloca'+"
"+"
"+'geral'+"
";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i"+"sobe"+""+temp+"
";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}Dom.setStyle(novoel,"opacity",this.OPACIDADE/100);temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-28-28;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);falta=alturadisponivel-(ticone*numerobotoes);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(this.AUTOALTURA===true||(numerobotoesnumerobotoes)){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}if((barraZoom===true)&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.navega.barraDeZoom.ativa()}YAHOO.janelaBotoes.xp.panel.render();YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=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}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","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 abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;ifecha
"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="
fecha
"}}if(mensagem!==""){if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;divmensagem.style.display="block";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)}},escondeJanelaAjuda:function(){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");try{clearTimeout(timeAjudaBotoes)}catch(e){}}}; +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={AJUDA:true,TIPOAJUDA:"horizontal",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:false,pan:false,zoomtot:false,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,reinicia:true,exten:true,referencia:true,inserexy:true,textofid:true,selecao:true,google:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(this.BOTAOPADRAO).onclick.apply()}catch(e){alert(e)}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}else{estilo.border="0px solid white"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,d,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.barraDeBotoes.mostraJanela(this,"");};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}if(padrao===""){this.ativaIcone("")}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(this.TEMPLATEBOTAO===""){this.TEMPLATEBOTAO="
"}var falta,ticone,tipo,mostra,i,temp,elementos,e,wj,recuo,novoel,alturadisponivel,n,chaves,re,estilo,numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='
'+"
"+'zoom'+"
"+"
"+'desloca'+"
"+"
"+'geral'+"
";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i"+"sobe"+""+temp+"
";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}Dom.setStyle(novoel,"opacity",this.OPACIDADE/100);temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='
';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-28-28;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);falta=alturadisponivel-(ticone*numerobotoes);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(this.AUTOALTURA===true||(numerobotoesnumerobotoes)){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}if((barraZoom===true)&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.navega.barraDeZoom.ativa()}YAHOO.janelaBotoes.xp.panel.render();YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i=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}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","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 abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;ifecha
"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="
fecha
"}}if(mensagem!==""){if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;divmensagem.style.display="block";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)}},escondeJanelaAjuda:function(){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");try{clearTimeout(timeAjudaBotoes)}catch(e){}}}; function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}var tempUtm,s,n,i,t;if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="
UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+"  
";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{var ins;if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins=''+''+''+''+''+''+''+'',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+=''+""+"
'+titulo+' X: '+$inputText('','315',prefixo+'xg','grau','3','-00')+' '+$inputText('','',prefixo+'xm','minuto','3','00')+' '+$inputText('','',prefixo+'xs','segundo','5','00.00')+' Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+' '+$inputText('','',prefixo+'ym','minuto','3','00')+' '+$inputText('','',prefixo+'ys','segundo','5','00.00')+'"+caixa+"
";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"
"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins=""+""+""+""+""+"
"+titulo+" X: "+$inputText("","",prefixo+"X","X","12","00")+" Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" "+caixa+""+"
";return ins},atualizaProj4:function(onde,configProj,x,y){var destino,zona,temp,p,iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"
"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i";for(i=0;i"+temp.titulo+""}}caixa+="";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){$i(id).style.display="block";atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}};if(!$i("i3geo_escalanum")){i=$inputText(id,"155","i3geo_escalanum",$trad("d10"),"15",parseInt(i3GEO.parametros.mapscale,10));ins="
1:"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="
";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}else{atualizaEscalaNumerica=function(){}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};i=$inputText(id,"210","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));ins="
   "+i;ins+="
";temp=$i(id);if(temp){temp.innerHTML=ins}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins=""}else{ins+="6px;'>"}ins+="";ins+="";ins+="";ins+="
 
";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else{marcadorZoom=0}}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual=0){do{visuais+=" "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){var imgstemp,imgs,i,temp,elementos,elt,caminho,j,busca,nimagem;try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");imgstemp=retorno.data.arquivos;imgs=[];i=imgstemp.length-1;if(i>=0){do{temp=imgstemp[i].split(".");if((temp[1]==="png")||(temp[1]==="gif")||(temp[1]==="jpg")){imgs.push(imgstemp[i])}}while(i--)}elementos=document.getElementsByTagName("img");elt=elementos.length;caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";j=imgs.length-1;if(j>=0){do{for(i=0;i-1)&&((elementos[i].className!=="")||(elementos[i].id!==""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+"sprite.png')"}}}while(j--)}j=imgs.length-1;if(j>=0){do{busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}elementos=["barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic"];i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:[],quadroatual:0,geraLegenda:false,inicia:function(qs,lugarquadros){if(i3GEO.Interface.ATUAL!=="padrao"){return}if(arguments.length===1){lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q,i,temp,p;q="";for(i=0;i
";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){temp=$i("imgClone");p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){if(i3GEO.Interface.ATUAL!=="padrao"){return}eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){if(i3GEO.Interface.ATUAL!=="padrao"){return}try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)===(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice,i,c,iclone;indice=quadro.replace("quadro","");i=$i(i3GEO.Interface.IDMAPA);c=$i("imgClone");if(i){if(!c){iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){}}},opcoes:function(obj){var js,volta;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{if(typeof(i3GEOF.opcoesQuadros)==='undefined'){js=i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script")}}},anima:function(Qanima,t){var doc;if(arguments.length===0){Qanima=0;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){var volta,wi,mensagem,i;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{wi=window.open("");mensagem="
Não existem imagens guardadas.";wi.document.write("

Click com o botão da direita do mouse sobre a imagem para fazer o download
");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("

Imagem: "+i+"
");wi.document.write("

Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"
");wi.document.write("");wi.document.write("");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("")}}i--}while(i>=0)}wi.document.write("
Fim");wi.document.close()}}},mostraMenuSuspenso:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=id}var objid,ins,sobe,alinhamento,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,MM=YAHOO.widget.MenuManager;objid=$i(id);if(objid){objid.className="yuimenubar";if($i("contemMenu")){$i("contemMenu").className="yui-navset"}if(!i3GEO.configura.oMenuData.menu){ins='

'+''+'
';objid.innerHTML=ins}else{ins="";alinhamento="";if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){alinhamento="left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"}ins+='
'+'
    ';n=i3GEO.configura.oMenuData.menu.length;for(i=0;i '+i3GEO.configura.oMenuData.menu[i].nome+''}ins+='
';ins+='
';objid.innerHTML=ins}onMenuBarBeforeRender=function(p_sType,p_sArgs){var conta,nomeMenu;if(i3GEO.parametros.w>=500){conta=0}else{conta=0}for(nomeMenu in i3GEO.configura.oMenuData.submenus){if($i("menu"+nomeMenu)){if(i3GEO.configura.oMenuData.submenus[nomeMenu]!==""){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:i3GEO.configura.oMenuData.submenus[nomeMenu]})}conta=conta+1}}};if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});MM.addMenu(i3GEOoMenuBar);i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();try{if(i3GEO.Interface.ATUAL==="padrao"&&$i("omenudataInterface1")){MM.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"&&$i("omenudataInterface2")){MM.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"&&$i("omenudataInterface3")){MM.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"&&$i("omenudataInterface4")){MM.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataInterface5")){MM.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){MM.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){MM.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";if(navn){temp.border="0px solid white"}else{temp.border="1px dotted white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}}}}; +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida"},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraVersao":{idhtml:"versaoi3geo"}},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"280","i3geo_urlkml","kml url","40","");ins="
Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="
";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){$i(id).style.display="block";atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}};if(!$i("i3geo_escalanum")){i=$inputText(id,"155","i3geo_escalanum",$trad("d10"),"15",parseInt(i3GEO.parametros.mapscale,10));ins="
1:"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="
";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}else{atualizaEscalaNumerica=function(){}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};i=$inputText(id,"210","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));ins="
   "+i;ins+="
";temp=$i(id);if(temp){temp.innerHTML=ins}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins=""}else{ins+="6px;'>"}ins+="";ins+="";ins+="";ins+="
 
";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else{marcadorZoom=0}}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual=0){do{visuais+=" "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){var imgstemp,imgs,i,temp,elementos,elt,caminho,j,busca,nimagem;try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");imgstemp=retorno.data.arquivos;imgs=[];i=imgstemp.length-1;if(i>=0){do{temp=imgstemp[i].split(".");if((temp[1]==="png")||(temp[1]==="gif")||(temp[1]==="jpg")){imgs.push(imgstemp[i])}}while(i--)}elementos=document.getElementsByTagName("img");elt=elementos.length;caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";j=imgs.length-1;if(j>=0){do{for(i=0;i-1)&&((elementos[i].className!=="")||(elementos[i].id!==""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+"sprite.png')"}}}while(j--)}j=imgs.length-1;if(j>=0){do{busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}elementos=["barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic"];i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:[],quadroatual:0,geraLegenda:false,inicia:function(qs,lugarquadros){if(i3GEO.Interface.ATUAL!=="padrao"){return}if(arguments.length===1){lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q,i,temp,p;q="";for(i=0;i
";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){temp=$i("imgClone");p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){if(i3GEO.Interface.ATUAL!=="padrao"){return}eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){if(i3GEO.Interface.ATUAL!=="padrao"){return}try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)===(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice,i,c,iclone;indice=quadro.replace("quadro","");i=$i(i3GEO.Interface.IDMAPA);c=$i("imgClone");if(i){if(!c){iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){}}},opcoes:function(obj){var js,volta;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{if(typeof(i3GEOF.opcoesQuadros)==='undefined'){js=i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script")}}},anima:function(Qanima,t){var doc;if(arguments.length===0){Qanima=0;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){var volta,wi,mensagem,i;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{wi=window.open("");mensagem="
Não existem imagens guardadas.";wi.document.write("

Click com o botão da direita do mouse sobre a imagem para fazer o download
");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("

Imagem: "+i+"
");wi.document.write("

Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"
");wi.document.write("");wi.document.write("");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("")}}i--}while(i>=0)}wi.document.write("
Fim");wi.document.close()}}},mostraMenuSuspenso:function(id){var objid,sobe,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,MM=YAHOO.widget.MenuManager,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}ins+='

'+'
    ';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i '+confm.menu[i].nome+''}ins+='
';ins+='
';objid.innerHTML=ins;onMenuBarBeforeRender=function(p_sType,p_sArgs){var conta,nomeMenu,nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});MM.addMenu(i3GEOoMenuBar);i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();try{if(i3GEO.Interface.ATUAL==="padrao"){MM.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"){MM.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"){MM.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"){MM.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"){MM.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){MM.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){MM.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";if(navn){temp.border="0px solid white"}else{temp.border="1px dotted white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}}}}; if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return""}if(tipo==="semtotal"){return""}},publicarTwitter:function(url,tipo){if(tipo==="comtotal"){return''}if(tipo==="semtotal"){return''}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+=""}if(tipo==="semtotal"){tabela+="
"}if(onde||id===""){if(urlpt!==""){tabela+=""}if(urlcf!==""){tabela+=""}tabela+="
"+i3GEO.social.publicarTwitter(urlpt,tipo)+""+i3GEO.social.curtirFacebook(urlcf,tipo)+"
";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins=" ";ins+=" ";ins+=" ";ins+="";return ins}}; \ No newline at end of file diff --git a/css/botoes.css b/css/botoes.css index e2788c2..aa38ed8 100644 --- a/css/botoes.css +++ b/css/botoes.css @@ -1,7 +1,7 @@ /* utiliza botões antigos até a versão 4.4 do i3geo */ -#uploadgpx,#metar,#carouselTemas,#identificaBalao,#rota,#buscafotos,#area,#confluence,#scielo,#wiki,#inseregrafico,#realca,#reinicia,#google,#zoomtot,#pan,#zoomli,#zoomlo,#zoomiauto,#zoomoauto,#identifica,#lentei,#reinicia,#exten,#selecao,#inserexy,#textofid,#mede,#perfil,#cruza,#tamanho,#imprimir,#salva,#carrega,#referencia,#pegaimagens,#v3d +#soltaLeg,#uploadgpx,#metar,#carouselTemas,#identificaBalao,#rota,#buscafotos,#area,#confluence,#scielo,#wiki,#inseregrafico,#realca,#reinicia,#google,#zoomtot,#pan,#zoomli,#zoomlo,#zoomiauto,#zoomoauto,#identifica,#lentei,#reinicia,#exten,#selecao,#inserexy,#textofid,#mede,#perfil,#cruza,#tamanho,#imprimir,#salva,#carrega,#referencia,#pegaimagens,#v3d {cursor:pointer;border: 0px solid rgb(50,50,50);border-bottom:1px solid rgb(50,50,50);border-left:1px solid rgb(50,50,50);width:22;height:22;z-index:1000;position:relative;} #box1 {font-size:0px;cursor:crosshair;opacity:.25;background-color: gray;position: absolute;visibility: hidden;width: 0px;height: 0px;border: 2px solid #ff0000;} @@ -714,6 +714,15 @@ utiliza botões antigos até a versão 4.4 do i3geo border: 1px solid #DCDCDC; cursor:pointer; } +#soltaLeg +{ + background-image:URL('../imagens/visual/default/sprite.png'); + background-repeat: no-repeat; + background-position: 0px -2100px; + cursor:pointer; + width:22px; + height:22px; +} button{background:url(../imagens/tic2.png) 98% 50% no-repeat;} #encolheFerramentas {background-image:URL('../imagens/encolhe.png');background-repeat: no-repeat;background-position:center;cursor:pointer;} \ No newline at end of file diff --git a/css/botoes2.css b/css/botoes2.css index 0e3ec58..312c9b4 100644 --- a/css/botoes2.css +++ b/css/botoes2.css @@ -722,6 +722,24 @@ width:16px; height:16px; } +#soltaLeg +{ + background-image:URL('../imagens/visual/default/sprite.png'); + background-repeat: no-repeat; + background-position: 0px -2100px; + cursor:pointer; + width:22px; + height:22px; +} +#soltaLeg2 +{ + background-image:URL('../imagens/visual/default/sprite.png'); + background-repeat: no-repeat; + background-position: 0px -2125px; + cursor:pointer; + width:16px; + height:16px; +} button{background:url(../imagens/tic2.png) 98% 50% no-repeat;} #encolheFerramentas {background-image:URL('../imagens/encolhe.png');background-repeat: no-repeat;background-position:center;cursor:pointer;} \ No newline at end of file diff --git a/imagens/visual/default/sprite.png b/imagens/visual/default/sprite.png index 567faeb..6f2278a 100644 Binary files a/imagens/visual/default/sprite.png and b/imagens/visual/default/sprite.png differ -- libgit2 0.21.2